提交 3051356a 编写于 作者: Y Yves Senn

Merge pull request #15437 from sgrif/sg-missing-test-case

Add missing test case for writing unknown attributes
......@@ -299,6 +299,8 @@ def test_read_attribute_raises_missing_attribute_error_when_not_exists
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册