diff options
author | Xavier Noria <fxn@hashref.com> | 2010-08-17 03:29:57 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2010-08-17 03:32:11 +0200 |
commit | fb6b80562041e8d2378cad1b51f8c234fe76fd5e (patch) | |
tree | e407af937ad119b1a5a6c977b13319f24994cde2 /activemodel | |
parent | d14e2987b583a3dcb6836d310f77ce367c7396f8 (diff) | |
download | rails-fb6b80562041e8d2378cad1b51f8c234fe76fd5e.tar.gz rails-fb6b80562041e8d2378cad1b51f8c234fe76fd5e.tar.bz2 rails-fb6b80562041e8d2378cad1b51f8c234fe76fd5e.zip |
code gardening: we have assert_(nil|blank|present), more concise, with better default failure messages - let's use them
Diffstat (limited to 'activemodel')
-rw-r--r-- | activemodel/test/cases/mass_assignment_security_test.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activemodel/test/cases/mass_assignment_security_test.rb b/activemodel/test/cases/mass_assignment_security_test.rb index c25b0fdf00..f84e55e8d9 100644 --- a/activemodel/test/cases/mass_assignment_security_test.rb +++ b/activemodel/test/cases/mass_assignment_security_test.rb @@ -25,13 +25,13 @@ class MassAssignmentSecurityTest < ActiveModel::TestCase end def test_mass_assignment_protection_inheritance - assert LoosePerson.accessible_attributes.blank? + assert_blank LoosePerson.accessible_attributes assert_equal Set.new([ 'credit_rating', 'administrator']), LoosePerson.protected_attributes - assert LooseDescendant.accessible_attributes.blank? + assert_blank LooseDescendant.accessible_attributes assert_equal Set.new([ 'credit_rating', 'administrator', 'phone_number']), LooseDescendant.protected_attributes - assert LooseDescendantSecond.accessible_attributes.blank? + assert_blank LooseDescendantSecond.accessible_attributes assert_equal Set.new([ 'credit_rating', 'administrator', 'phone_number', 'name']), LooseDescendantSecond.protected_attributes, 'Running attr_protected twice in one class should merge the protections' |