mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
test refactor
This commit is contained in:
parent
711097e6a5
commit
28574961fb
1 changed files with 2 additions and 5 deletions
|
@ -712,12 +712,9 @@ class AttributeMethodsTest < ActiveRecord::TestCase
|
|||
end
|
||||
|
||||
def test_bulk_update_raise_unknown_attribute_errro
|
||||
error = nil
|
||||
begin
|
||||
error = assert_raises(ActiveRecord::UnknownAttributeError) {
|
||||
@target.new(:hello => "world")
|
||||
rescue ActiveRecord::UnknownAttributeError => error
|
||||
end
|
||||
assert error
|
||||
}
|
||||
assert @target, error.record
|
||||
assert "hello", error.attribute
|
||||
assert "unknown attribute: hello", error.message
|
||||
|
|
Loading…
Reference in a new issue