diff options
Diffstat (limited to 'actionpack/test/controller/parameters/accessors_test.rb')
-rw-r--r-- | actionpack/test/controller/parameters/accessors_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/actionpack/test/controller/parameters/accessors_test.rb b/actionpack/test/controller/parameters/accessors_test.rb index 7b9b716a42..cb49eeb1b7 100644 --- a/actionpack/test/controller/parameters/accessors_test.rb +++ b/actionpack/test/controller/parameters/accessors_test.rb @@ -213,6 +213,15 @@ class ParametersAccessorsTest < ActiveSupport::TestCase assert_kind_of ActionController::Parameters, @params.transform_keys!.each { |k| k } end + test "deep_transform_keys retains permitted status" do + @params.permit! + assert_predicate @params.deep_transform_keys { |k| k }, :permitted? + end + + test "deep_transform_keys retains unpermitted status" do + assert_not_predicate @params.deep_transform_keys { |k| k }, :permitted? + end + test "transform_values retains permitted status" do @params.permit! assert_predicate @params.transform_values { |v| v }, :permitted? |