diff options
author | Godfrey Chan <godfreykfc@gmail.com> | 2014-12-15 14:46:32 -0800 |
---|---|---|
committer | Godfrey Chan <godfreykfc@gmail.com> | 2014-12-15 14:46:32 -0800 |
commit | 488aefe7426bbd6f071019dff4c4cd1fbfd56742 (patch) | |
tree | c6d6a90582aa07f37502e34f301a750072f28779 /actionpack/test/dispatch/request/json_params_parsing_test.rb | |
parent | 485723e87a969984c054f68d1781cf99f8a68a5f (diff) | |
parent | 8f8ccb9901cab457c6e1d52bdb25acf658fd5777 (diff) | |
download | rails-488aefe7426bbd6f071019dff4c4cd1fbfd56742.tar.gz rails-488aefe7426bbd6f071019dff4c4cd1fbfd56742.tar.bz2 rails-488aefe7426bbd6f071019dff4c4cd1fbfd56742.zip |
Merge pull request #16924 from Sinjo/params-deep-munge-empty-array
Don't convert empty arrays to nils when deep munging params
Diffstat (limited to 'actionpack/test/dispatch/request/json_params_parsing_test.rb')
-rw-r--r-- | actionpack/test/dispatch/request/json_params_parsing_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/test/dispatch/request/json_params_parsing_test.rb b/actionpack/test/dispatch/request/json_params_parsing_test.rb index c609075e6b..b765a13fa1 100644 --- a/actionpack/test/dispatch/request/json_params_parsing_test.rb +++ b/actionpack/test/dispatch/request/json_params_parsing_test.rb @@ -39,7 +39,7 @@ class JsonParamsParsingTest < ActionDispatch::IntegrationTest test "nils are stripped from collections" do assert_parses( - {"person" => nil}, + {"person" => []}, "{\"person\":[null]}", { 'CONTENT_TYPE' => 'application/json' } ) assert_parses( @@ -47,7 +47,7 @@ class JsonParamsParsingTest < ActionDispatch::IntegrationTest "{\"person\":[\"foo\",null]}", { 'CONTENT_TYPE' => 'application/json' } ) assert_parses( - {"person" => nil}, + {"person" => []}, "{\"person\":[null, null]}", { 'CONTENT_TYPE' => 'application/json' } ) end |