test/functional/eft_3_participant.rb in ruote-2.1.9 vs test/functional/eft_3_participant.rb in ruote-2.1.10
- old
+ new
@@ -26,10 +26,11 @@
#noisy
assert_trace 'alpha', pdef
assert_log_count(1) { |e| e['action'] == 'dispatch' }
+ assert_log_count(1) { |e| e['action'] == 'dispatched' }
assert_log_count(1) { |e| e['action'] == 'receive' }
end
def test_participant_att_text
@@ -115,8 +116,34 @@
assert_trace 'done.', pdef
assert_equal(
{ "commander of the left guard"=>nil, "if"=>"true", "ref"=>"notify" },
atts)
+ end
+
+ def test_dispatched
+
+ part = @engine.register_participant :alpha do
+ sleep 1
+ end
+
+ pdef = Ruote.process_definition do
+ alpha
+ end
+
+ #noisy
+
+ wfid = @engine.launch(pdef)
+
+ wait_for(:alpha)
+
+ ps = @engine.process(wfid)
+
+ fexp = ps.expressions.find { |fe|
+ fe.class == Ruote::Exp::ParticipantExpression
+ }
+
+ assert_equal nil, fexp.dispatched
+ # not yet 'dispatched'
end
end