diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2012-06-08 11:35:13 -0700 |
---|---|---|
committer | Piotr Sarnacki <drogus@gmail.com> | 2012-06-08 11:35:13 -0700 |
commit | 41d63710f22065c16582125873a4e3c14357bd7f (patch) | |
tree | 92cd96eaa972b4abb02501398e6245f1060b6b0f /activemodel/test | |
parent | d1136e6ad0aab44cfc0626c553b3ee82479f6196 (diff) | |
parent | 00ff0a6776aca4977dc6eab5ec130c67e36c36ac (diff) | |
download | rails-41d63710f22065c16582125873a4e3c14357bd7f.tar.gz rails-41d63710f22065c16582125873a4e3c14357bd7f.tar.bz2 rails-41d63710f22065c16582125873a4e3c14357bd7f.zip |
Merge pull request #6668 from pomnikita/master
Compact array of values added to PermissionSet instance
Diffstat (limited to 'activemodel/test')
-rw-r--r-- | activemodel/test/cases/mass_assignment_security/permission_set_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activemodel/test/cases/mass_assignment_security/permission_set_test.rb b/activemodel/test/cases/mass_assignment_security/permission_set_test.rb index d005b638e4..8082c49852 100644 --- a/activemodel/test/cases/mass_assignment_security/permission_set_test.rb +++ b/activemodel/test/cases/mass_assignment_security/permission_set_test.rb @@ -13,6 +13,12 @@ class PermissionSetTest < ActiveModel::TestCase assert new_list.include?('admin'), "did not add collection to #{@permission_list.inspect}}" end + test "+ compacts added collection values" do + added_collection = [ nil ] + new_list = @permission_list + added_collection + assert_equal new_list, @permission_list, "did not add collection to #{@permission_list.inspect}}" + end + test "include? normalizes multi-parameter keys" do multi_param_key = 'admin(1)' new_list = @permission_list += [ 'admin' ] |