aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/parameters
diff options
context:
space:
mode:
authorPrem Sichanugrist <s@sikac.hu>2015-07-13 16:43:21 -0400
committerPrem Sichanugrist <s@sikac.hu>2015-07-15 11:11:36 -0400
commit14a3bd520dd4bbf1247fd3e0071b59c02c115ce0 (patch)
tree23d5f059a39e699aa0762fcea54fd33cd7952bdd /actionpack/test/controller/parameters
parenta0b4dc21a2188a4379bc401b73336608fec56c64 (diff)
downloadrails-14a3bd520dd4bbf1247fd3e0071b59c02c115ce0.tar.gz
rails-14a3bd520dd4bbf1247fd3e0071b59c02c115ce0.tar.bz2
rails-14a3bd520dd4bbf1247fd3e0071b59c02c115ce0.zip
Make AC::Parameters not inherited from Hash
This is another take at #14384 as we decided to wait until `master` is targeting Rails 5.0. This commit is implementation-complete, as it guarantees that all the public methods on the hash-inherited Parameters are still working (based on test case). We can decide to follow-up later if we want to remove some methods out from Parameters.
Diffstat (limited to 'actionpack/test/controller/parameters')
-rw-r--r--actionpack/test/controller/parameters/nested_parameters_test.rb2
-rw-r--r--actionpack/test/controller/parameters/parameters_permit_test.rb2
2 files changed, 1 insertions, 3 deletions
diff --git a/actionpack/test/controller/parameters/nested_parameters_test.rb b/actionpack/test/controller/parameters/nested_parameters_test.rb
index 3b1257e8d5..7151a8567c 100644
--- a/actionpack/test/controller/parameters/nested_parameters_test.rb
+++ b/actionpack/test/controller/parameters/nested_parameters_test.rb
@@ -136,7 +136,7 @@ class NestedParametersTest < ActiveSupport::TestCase
authors_attributes: {
:'0' => { name: 'William Shakespeare', age_of_death: '52' },
:'1' => { name: 'Unattributed Assistant' },
- :'2' => { name: %w(injected names)}
+ :'2' => { name: %w(injected names) }
}
}
})
diff --git a/actionpack/test/controller/parameters/parameters_permit_test.rb b/actionpack/test/controller/parameters/parameters_permit_test.rb
index 2ed486516d..05532ec21b 100644
--- a/actionpack/test/controller/parameters/parameters_permit_test.rb
+++ b/actionpack/test/controller/parameters/parameters_permit_test.rb
@@ -253,7 +253,6 @@ class ParametersPermitTest < ActiveSupport::TestCase
assert @params.to_h.is_a? Hash
assert_not @params.to_h.is_a? ActionController::Parameters
- assert_equal @params.to_hash, @params.to_h
end
test "to_h returns converted hash when .permit_all_parameters is set" do
@@ -284,6 +283,5 @@ class ParametersPermitTest < ActiveSupport::TestCase
test "to_unsafe_h returns unfiltered params" do
assert @params.to_h.is_a? Hash
assert_not @params.to_h.is_a? ActionController::Parameters
- assert_equal @params.to_hash, @params.to_unsafe_h
end
end