Skip to content

Commit

Permalink
Fix the test based on the changes on #40104
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelfranca committed Aug 26, 2020
1 parent 42913f1 commit 7101489
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -303,11 +303,11 @@ def test_trying_to_use_inverses_that_dont_exist_should_raise_an_error
if defined?(DidYouMean) && DidYouMean.respond_to?(:correct_error)
def test_trying_to_use_inverses_that_dont_exist_should_have_suggestions_for_fix
error = assert_raise(ActiveRecord::InverseOfAssociationNotFoundError) {
Human.first.dirty_face
Human.first.confused_face
}

assert_match "Did you mean?", error.message
assert_equal "horrible_human", error.corrections.first
assert_equal "super_human", error.corrections.first
end
end
end
Expand Down Expand Up @@ -665,11 +665,11 @@ def test_trying_to_use_inverses_that_dont_exist_should_raise_an_error
if defined?(DidYouMean) && DidYouMean.respond_to?(:correct_error)
def test_trying_to_use_inverses_that_dont_exist_should_have_suggestions_for_fix
error = assert_raise(ActiveRecord::InverseOfAssociationNotFoundError) {
Face.first.horrible_human
Face.first.puzzled_human
}

assert_match "Did you mean?", error.message
assert_equal "polymorphic_face", error.corrections.first
assert_equal "confused_face", error.corrections.first
end
end

Expand Down

0 comments on commit 7101489

Please sign in to comment.