aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/test/cases
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2010-08-17 03:29:57 +0200
committerXavier Noria <fxn@hashref.com>2010-08-17 03:32:11 +0200
commitfb6b80562041e8d2378cad1b51f8c234fe76fd5e (patch)
treee407af937ad119b1a5a6c977b13319f24994cde2 /activemodel/test/cases
parentd14e2987b583a3dcb6836d310f77ce367c7396f8 (diff)
downloadrails-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/test/cases')
-rw-r--r--activemodel/test/cases/mass_assignment_security_test.rb6
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'