test/functional/eft_30_ref.rb in ruote-2.1.11 vs test/functional/eft_30_ref.rb in ruote-2.2.0
- old
+ new
@@ -14,11 +14,11 @@
include FunctionalBase
class AlphaParticipant
include Ruote::LocalParticipant
- def consume (workitem)
+ def consume(workitem)
@context.tracer << workitem.fei.expid
@context.tracer << "\n"
reply(workitem)
end
end
@@ -123,18 +123,33 @@
pdef = Ruote.process_definition do
define 'sub0' do
alpha
end
- sub0 :timeout => '2d'
+ ref 'sub0', :timeout => '2d'
end
wfid = @engine.launch(pdef)
@engine.wait_for(:alpha)
scheds = @engine.schedules
assert_equal 1, scheds.size
assert_equal '0_1', scheds.first['target'].expid
+ end
+
+ def test_missing_ref_and_undo
+
+ pdef = Ruote.process_definition do
+ ref 'nemo', :on_error => 'undo'
+ end
+
+ #noisy
+
+ wfid = @engine.launch(pdef)
+
+ @engine.wait_for(wfid)
+
+ assert_nil @engine.process(wfid)
end
end