diff options
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/mass_assignment_security_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/cases/mass_assignment_security_test.rb b/activerecord/test/cases/mass_assignment_security_test.rb index 8122857f52..e47b06f244 100644 --- a/activerecord/test/cases/mass_assignment_security_test.rb +++ b/activerecord/test/cases/mass_assignment_security_test.rb @@ -98,6 +98,10 @@ class MassAssignmentSecurityTest < ActiveRecord::TestCase Firm.new.assign_attributes(nil) end + def test_mass_assigning_does_not_choke_on_empty_hash + Firm.new.assign_attributes({}) + end + def test_assign_attributes_uses_default_role_when_no_role_is_provided p = LoosePerson.new p.assign_attributes(attributes_hash) |