Fix the test based on the changes on #40104

上级 42913f15
......@@ -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
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册