Skip to content

Commit

Permalink
add test for duplicate Rescue().
Browse files Browse the repository at this point in the history
  • Loading branch information
apotonick committed Jun 10, 2023
1 parent 174ed12 commit fb5b033
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions test/docs/rescue_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -203,17 +203,22 @@ def self.call(*)
step Rescue(handler: :instance_method) {}
step Rescue() {}, id: "Rescue-1"
step Rescue(id: "Rescue-2") {}
# test identical configuration.
step Rescue() {}
step Rescue(handler: Validate) {}
end

# assert_equal Trailblazer::Developer::Introspect.find_path(activity, ["Each/EachIDTest::Validate"])[0].id, "Each/EachIDTest::Validate"
# assert_equal Trailblazer::Developer::Introspect.find_path(activity, ["Each-1"])[0].id, "Each-1"
# assert_equal Trailblazer::Developer::Introspect.find_path(activity, ["Each/composers_for_each"])[0].id, "Each/composers_for_each"

assert_match /Rescue\/\d+/, id_1 = Trailblazer::Activity::Introspect::Nodes(activity).values[1].id
assert_match /Rescue\/\d+/, id_2 = Trailblazer::Activity::Introspect::Nodes(activity).values[2].id
assert_match /Rescue\/\d+/, id_3 = Trailblazer::Activity::Introspect::Nodes(activity).values[3].id
assert_match "Rescue-1", id_4 = Trailblazer::Activity::Introspect::Nodes(activity).values[4].id
assert_match "Rescue-2", id_5 = Trailblazer::Activity::Introspect::Nodes(activity).values[5].id
assert_match /Rescue\/\d+/, Trailblazer::Activity::Introspect::Nodes(activity).values[1].id
assert_match /Rescue\/\d+/, Trailblazer::Activity::Introspect::Nodes(activity).values[2].id
assert_match /Rescue\/\d+/, Trailblazer::Activity::Introspect::Nodes(activity).values[3].id
assert_match "Rescue-1", Trailblazer::Activity::Introspect::Nodes(activity).values[4].id
assert_match "Rescue-2", Trailblazer::Activity::Introspect::Nodes(activity).values[5].id
assert_match /Rescue\/\d+/, Trailblazer::Activity::Introspect::Nodes(activity).values[6].id
assert_match /Rescue\/\d+/, Trailblazer::Activity::Introspect::Nodes(activity).values[7].id
end
end

Expand Down

0 comments on commit fb5b033

Please sign in to comment.