Skip to content

Commit

Permalink
more docs tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
apotonick committed Nov 15, 2023
1 parent 25ced00 commit 101ac87
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion test/docs/autogenerated/mechanics_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,23 @@ def notify(ctx, model:, params:, **)
result = Memo::Operation::Create.(params: {memo: nil, network_broken: false})
assert_equal result.success?, true

#:terminus
result = Memo::Operation::Create.(params: {memo: nil, network_broken: true})

result.terminus.to_h[:semantic] #=> :network_error
#:terminus end
assert_equal result.success?, false
assert_equal result.terminus.inspect, %(#<Trailblazer::Activity::End semantic=:network_error>)
assert_equal result.terminus.to_h[:semantic], :network_error

#:terminus-subprocess
module Endpoint
class API < Trailblazer::Operation
step Subprocess(Memo::Operation::Create),
Output(:network_error) => Track(:failure)
# ...
end
end
#:terminus-subprocess end
end
end

Expand Down

0 comments on commit 101ac87

Please sign in to comment.