diff options
author | Richard Schneeman <richard.schneeman@gmail.com> | 2016-01-19 13:02:46 -0600 |
---|---|---|
committer | Richard Schneeman <richard.schneeman@gmail.com> | 2016-01-19 13:02:46 -0600 |
commit | ba24d42828283156eba8544113739ce0c14283f0 (patch) | |
tree | 81f51ca8fc4d934b6006caff95ef191295d06d55 /actionpack/test/controller | |
parent | 1347f08521881efacfc42a7284073272affc1d1e (diff) | |
parent | 875a0b6e4f2a5f0b45a38632b4367aa83d995ac3 (diff) | |
download | rails-ba24d42828283156eba8544113739ce0c14283f0.tar.gz rails-ba24d42828283156eba8544113739ce0c14283f0.tar.bz2 rails-ba24d42828283156eba8544113739ce0c14283f0.zip |
Merge pull request #23123 from schneems/schneems/strong_params_method_missing
[close #23084] Deprecated StrongParameters
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r-- | actionpack/test/controller/required_params_test.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/actionpack/test/controller/required_params_test.rb b/actionpack/test/controller/required_params_test.rb index 168f64ce41..b6efcd6f9a 100644 --- a/actionpack/test/controller/required_params_test.rb +++ b/actionpack/test/controller/required_params_test.rb @@ -65,4 +65,17 @@ class ParametersRequireTest < ActiveSupport::TestCase .require([:first_name, :title]) end end + + test "value params" do + params = ActionController::Parameters.new(foo: "bar", dog: "cinco") + assert_equal ["bar", "cinco"], params.values + assert params.has_value?("cinco") + assert params.value?("cinco") + end + + test "Deprecated methods are deprecated" do + assert_deprecated do + ActionController::Parameters.new(foo: "bar").merge!({bar: "foo"}) + end + end end |