diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2018-07-20 21:06:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-20 21:06:25 +0200 |
commit | e7fe07e7f08a43d3f1bdcc522233a01fca184c28 (patch) | |
tree | 2183ddeed001aa667fbd4a896069fccdd83870b1 /actionpack/test/controller/integration_test.rb | |
parent | 1a0bcc3b49e05eba852912f609a20c36a9656857 (diff) | |
parent | 9b51ee9f925e9c1f64d0bae2039ff70cea0d0959 (diff) | |
download | rails-e7fe07e7f08a43d3f1bdcc522233a01fca184c28.tar.gz rails-e7fe07e7f08a43d3f1bdcc522233a01fca184c28.tar.bz2 rails-e7fe07e7f08a43d3f1bdcc522233a01fca184c28.zip |
Merge pull request #33392 from azbshiri/actionpack/prevent-request-encoder-to-parse-nil-params
Prevent `RequestEncoder#encode_params` to parse falsey params
Diffstat (limited to 'actionpack/test/controller/integration_test.rb')
-rw-r--r-- | actionpack/test/controller/integration_test.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/actionpack/test/controller/integration_test.rb b/actionpack/test/controller/integration_test.rb index 41812a82e1..39ede1442a 100644 --- a/actionpack/test/controller/integration_test.rb +++ b/actionpack/test/controller/integration_test.rb @@ -1079,6 +1079,20 @@ class IntegrationRequestEncodersTest < ActionDispatch::IntegrationTest end end + def test_get_request_with_json_excludes_null_query_string + with_routing do |routes| + routes.draw do + ActiveSupport::Deprecation.silence do + get ":action" => FooController + end + end + + get "/foos_json", as: :json + + assert_equal "http://www.example.com/foos_json", request.url + end + end + private def post_to_foos(as:) with_routing do |routes| |