aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorRichard Schneeman <richard.schneeman@gmail.com>2016-09-07 10:46:48 -0500
committerGitHub <noreply@github.com>2016-09-07 10:46:48 -0500
commit71f37ce4893f63da49e4854db945a8ccb0ae3f5c (patch)
treea5d560b794515dbf485733eb2122214b79267972 /actionpack/test
parente703fc1f40c892771a0c3d81a03e7aa3561ef64a (diff)
parent700c55831f993d52dcc1eb301346fbcfd54b82d9 (diff)
downloadrails-71f37ce4893f63da49e4854db945a8ccb0ae3f5c.tar.gz
rails-71f37ce4893f63da49e4854db945a8ccb0ae3f5c.tar.bz2
rails-71f37ce4893f63da49e4854db945a8ccb0ae3f5c.zip
Merge pull request #26418 from y-yagi/fixes_26415
call `.to_h` to avoid using deprecated method
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/controller/parameters/parameters_permit_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/test/controller/parameters/parameters_permit_test.rb b/actionpack/test/controller/parameters/parameters_permit_test.rb
index 164efd936c..728d8e1279 100644
--- a/actionpack/test/controller/parameters/parameters_permit_test.rb
+++ b/actionpack/test/controller/parameters/parameters_permit_test.rb
@@ -237,6 +237,13 @@ class ParametersPermitTest < ActiveSupport::TestCase
assert @params.merge(a: "b").permitted?
end
+ test "merge with parameters" do
+ other_params = ActionController::Parameters.new(id: "1234").permit!
+ merged_params = @params.merge(other_params)
+
+ assert merged_params[:id]
+ end
+
test "modifying the parameters" do
@params[:person][:hometown] = "Chicago"
@params[:person][:family] = { brother: "Jonas" }