Skip to content

Commit

Permalink
add docs test.
Browse files Browse the repository at this point in the history
  • Loading branch information
apotonick committed Nov 18, 2023
1 parent 46c8c2b commit c585e76
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions test/docs/wiring_api_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,25 +62,28 @@ class Create < Trailblazer::Activity::Railway
end
end

#@ Output => End
#@ failure/Output => End
class OutputOnLeft_WiringApiDocsTest < Minitest::Spec
Memo = Class.new
#:left
module Memo::Activity
class Create < Trailblazer::Activity::Railway
step :validate
step :save
left :fix_errors,
left :handle_errors,
Output(:success) => Track(:success)
step :notify
#~meths
include T.def_steps(:validate, :save, :fix_errors, :notify)
include T.def_steps(:validate, :save, :handle_errors, :notify)
#~meths end
end
end
#:left end

it "what" do
assert_invoke Memo::Activity::Create, seq: "[:validate, :save, :notify]"
assert_invoke Memo::Activity::Create, seq: "[:validate, :save, :fix_errors, :notify]", save: false
assert_invoke Memo::Activity::Create, seq: "[:validate, :save, :fix_errors]", save: false, fix_errors: false, terminus: :failure
assert_invoke Memo::Activity::Create, seq: "[:validate, :save, :handle_errors, :notify]", save: false
assert_invoke Memo::Activity::Create, seq: "[:validate, :save, :handle_errors]", save: false, handle_errors: false, terminus: :failure
end
end

Expand Down

0 comments on commit c585e76

Please sign in to comment.