diff options
author | Josh Kalderimis <josh.kalderimis@gmail.com> | 2011-05-08 16:42:00 +0200 |
---|---|---|
committer | Josh Kalderimis <josh.kalderimis@gmail.com> | 2011-05-08 16:43:29 +0200 |
commit | b2451f4a7fa4fe20dff278edd33fe8a4b1d65be7 (patch) | |
tree | 305ee339919672e28c9937b76420300de7221b0f /activemodel/test | |
parent | 9727dd1e385aaa188a198d86102a840ebcc625e8 (diff) | |
download | rails-b2451f4a7fa4fe20dff278edd33fe8a4b1d65be7.tar.gz rails-b2451f4a7fa4fe20dff278edd33fe8a4b1d65be7.tar.bz2 rails-b2451f4a7fa4fe20dff278edd33fe8a4b1d65be7.zip |
renamed mass-assignment scopes to roles, updated code, tests, docs and security guide
Diffstat (limited to 'activemodel/test')
-rw-r--r-- | activemodel/test/cases/mass_assignment_security_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activemodel/test/cases/mass_assignment_security_test.rb b/activemodel/test/cases/mass_assignment_security_test.rb index b22ce874ea..43a12eed61 100644 --- a/activemodel/test/cases/mass_assignment_security_test.rb +++ b/activemodel/test/cases/mass_assignment_security_test.rb @@ -10,7 +10,7 @@ class MassAssignmentSecurityTest < ActiveModel::TestCase assert_equal expected, sanitized end - def test_only_moderator_scope_attribute_accessible + def test_only_moderator_role_attribute_accessible user = SpecialUser.new expected = { "name" => "John Smith", "email" => "john@smith.com" } sanitized = user.sanitize_for_mass_assignment(expected.merge("admin" => true), :moderator) @@ -27,7 +27,7 @@ class MassAssignmentSecurityTest < ActiveModel::TestCase assert_equal expected, sanitized end - def test_admin_scoped_attributes_accessible + def test_attributes_accessible_with_admin_role user = Person.new expected = { "name" => "John Smith", "email" => "john@smith.com", "admin" => true } sanitized = user.sanitize_for_mass_assignment(expected.merge("super_powers" => true), :admin) |