提交 9ad8d670 编写于 作者: C Carlos Antonio da Silva

Assert the query result instead of checking for nothing raised

Nothing should be raised anyway 😄

Thanks @spastorino 
https://github.com/rails/rails/pull/8202/files#r2112067
上级 087150d9
......@@ -611,10 +611,8 @@ def test_find_by_one_attribute_that_is_an_alias
end
def test_find_by_one_attribute_bang_with_blank_defined
BlankTopic.create(title: "The Blank One")
assert_nothing_raised do
BlankTopic.find_by_title!("The Blank One")
end
blank_topic = BlankTopic.create(title: "The Blank One")
assert_equal blank_topic, BlankTopic.find_by_title!("The Blank One")
end
def test_find_by_one_attribute_with_conditions
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册