aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/parameters
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/controller/parameters')
-rw-r--r--actionpack/test/controller/parameters/parameters_permit_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/actionpack/test/controller/parameters/parameters_permit_test.rb b/actionpack/test/controller/parameters/parameters_permit_test.rb
index ba191a7227..9c1828e9aa 100644
--- a/actionpack/test/controller/parameters/parameters_permit_test.rb
+++ b/actionpack/test/controller/parameters/parameters_permit_test.rb
@@ -160,6 +160,11 @@ class ParametersPermitTest < ActiveSupport::TestCase
end
end
+ test 'arrays are converted at most once' do
+ params = ActionController::Parameters.new(foo: [{}])
+ assert params[:foo].equal?(params[:foo])
+ end
+
test "fetch doesnt raise ParameterMissing exception if there is a default" do
assert_equal "monkey", @params.fetch(:foo, "monkey")
assert_equal "monkey", @params.fetch(:foo) { "monkey" }