test/functional/ft_12_launchitem.rb in ruote-2.1.11 vs test/functional/ft_12_launchitem.rb in ruote-2.2.0

- old
+ new

@@ -15,14 +15,12 @@ pdef = Ruote.process_definition do alpha end - fields = nil - @engine.register_participant :alpha do |workitem| - fields = workitem.fields + stash[:fields] = workitem.fields @tracer << 'a' nil end #noisy @@ -30,10 +28,16 @@ wfid = @engine.launch(pdef, 'a' => 0, 'b' => 1) wait_for(wfid) assert_equal('a', @tracer.to_s) - assert_not_nil(fields.delete('dispatched_at')) - assert_equal({"a"=>0, "b"=>1, "params"=>{"ref"=>"alpha"}}, fields) + @engine.context.stash[:fields].delete('__result__') + + assert_not_nil( + @engine.context.stash[:fields].delete('dispatched_at')) + + assert_equal( + {"a"=>0, "b"=>1, "params"=>{"ref"=>"alpha"}}, + @engine.context.stash[:fields]) end end