diff options
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/parameters/mutators_test.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/actionpack/test/controller/parameters/mutators_test.rb b/actionpack/test/controller/parameters/mutators_test.rb index 31ee7964f5..ffffd2996f 100644 --- a/actionpack/test/controller/parameters/mutators_test.rb +++ b/actionpack/test/controller/parameters/mutators_test.rb @@ -127,4 +127,22 @@ class ParametersMutatorsTest < ActiveSupport::TestCase test "deep_transform_keys! retains unpermitted status" do assert_not_predicate @params.deep_transform_keys! { |k| k }, :permitted? end + + test "compact_blank retains permitted status" do + @params.permit! + assert_predicate @params.compact_blank, :permitted? + end + + test "compact_blank retains unpermitted status" do + assert_not_predicate @params.compact_blank, :permitted? + end + + test "compact_blank! retains permitted status" do + @params.permit! + assert_predicate @params.compact_blank!, :permitted? + end + + test "compact_blank! retains unpermitted status" do + assert_not_predicate @params.compact_blank!, :permitted? + end end |