aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2013-09-24 20:59:26 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2013-09-24 20:59:26 -0300
commit43d600ee20ea20e0ef65670f95186b74633fc090 (patch)
tree126680552a02cb90e01d3b8ce71ab214006e5c8d /activerecord/test
parent1e810024f779d8fb4ac9273e1fc06c5118feec7d (diff)
downloadrails-43d600ee20ea20e0ef65670f95186b74633fc090.tar.gz
rails-43d600ee20ea20e0ef65670f95186b74633fc090.tar.bz2
rails-43d600ee20ea20e0ef65670f95186b74633fc090.zip
Add regression test to #12343
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/forbidden_attributes_protection_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/test/cases/forbidden_attributes_protection_test.rb b/activerecord/test/cases/forbidden_attributes_protection_test.rb
index 490b599fb6..981a75faf6 100644
--- a/activerecord/test/cases/forbidden_attributes_protection_test.rb
+++ b/activerecord/test/cases/forbidden_attributes_protection_test.rb
@@ -61,4 +61,9 @@ class ForbiddenAttributesProtectionTest < ActiveRecord::TestCase
assert_equal 'Guille', person.first_name
assert_equal 'm', person.gender
end
+
+ def test_blank_attributes_should_not_raise
+ person = Person.new
+ assert_nil person.assign_attributes(ProtectedParams.new({}))
+ end
end