Skip to content

Commit

Permalink
fix test.
Browse files Browse the repository at this point in the history
  • Loading branch information
apotonick committed Jan 16, 2025
1 parent 446b6ca commit 8f3f7b2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions test/assertion_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ def model(ctx, params:, **)
# test_0008_anonymous
# expected_errors is wrong
it do
assert_fail Update, {params: {title: nil}}, [:title_XXX] do |result|
assert_fail Update, {params: {title: nil}}, [:title, :XXX] do |result|
@_m = true
end
end
Expand Down Expand Up @@ -310,8 +310,6 @@ def model(ctx, params:, **)
end
end

raise "what if assert_fail errors are only subset of user's?"

test_1 = test.new(:test_0001_anonymous)
failures = test_1.()
assert_equal failures.size, 0
Expand Down Expand Up @@ -357,7 +355,7 @@ def model(ctx, params:, **)
assert_nil test_8.instance_variable_get(:@_m) # block is not executed.
assert_equal failures.size, 1
assert_equal failures[0].inspect, %(#<Minitest::Assertion: Actual contract errors: \e[33m{:title=>[\"is missing\"]}\e[0m.
Expected: [:title_XXX]
Expected: [:XXX, :title]
Actual: [:title]>)

test_9 = test.new(:test_0009_anonymous)
Expand Down

0 comments on commit 8f3f7b2

Please sign in to comment.