diff options
author | Richard Schneeman <richard.schneeman@gmail.com> | 2016-09-07 10:46:48 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-07 10:46:48 -0500 |
commit | 71f37ce4893f63da49e4854db945a8ccb0ae3f5c (patch) | |
tree | a5d560b794515dbf485733eb2122214b79267972 /actionpack/test | |
parent | e703fc1f40c892771a0c3d81a03e7aa3561ef64a (diff) | |
parent | 700c55831f993d52dcc1eb301346fbcfd54b82d9 (diff) | |
download | rails-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.rb | 7 |
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" } |