mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Add missing test case for writing unknown attributes
This commit is contained in:
parent
2c51c405e0
commit
7c8f88c609
1 changed files with 2 additions and 0 deletions
|
@ -299,6 +299,8 @@ class AttributeMethodsTest < ActiveRecord::TestCase
|
|||
computer = Computer.select('id').first
|
||||
assert_raises(ActiveModel::MissingAttributeError) { computer[:developer] }
|
||||
assert_raises(ActiveModel::MissingAttributeError) { computer[:extendedWarranty] }
|
||||
assert_raises(ActiveModel::MissingAttributeError) { computer[:no_column_exists] = 'Hello!' }
|
||||
assert_nothing_raised { computer[:developer] = 'Hello!' }
|
||||
end
|
||||
|
||||
def test_read_attribute_when_false
|
||||
|
|
Loading…
Reference in a new issue