Module: Trailblazer::Test::Assertion::AssertPass

Extended by:
Utils
Defined in:
lib/trailblazer/test/assertion/assert_pass.rb

Defined Under Namespace

Modules: Errors, Utils Classes: Passed, PassedWithAttributes

Class Method Summary collapse

Methods included from Utils

assert_after_call

Class Method Details

.assert_pass_with_model(signal, ctx, **options) ⇒ Object



13
14
15
16
17
18
# File 'lib/trailblazer/test/assertion/assert_pass.rb', line 13

def assert_pass_with_model(signal, ctx, **options)
  assert_after_call(ctx, **options) do |ctx|
    Passed.new.call(signal, ctx, **options)
    PassedWithAttributes.new.call(signal, ctx, **options)
  end
end

.call(activity, ctx, invoke:, **options) ⇒ Object



7
8
9
10
11
# File 'lib/trailblazer/test/assertion/assert_pass.rb', line 7

def call(activity, ctx, invoke:, **options)
  signal, ctx, _ = invoke.(activity, ctx)

  assert_pass_with_model(signal, ctx, operation: activity, **options)
end