diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2013-01-10 22:53:18 -0800 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2013-01-10 22:53:18 -0800 |
commit | 92fada9b8c10b75d88190938ea2fd5a92277697b (patch) | |
tree | 71445260ff346809533fa27a993995f3f2b6ffd1 /actionpack/test/dispatch/request/json_params_parsing_test.rb | |
parent | 8a7fad8970aadea3a79657ef09d3247786e27c2e (diff) | |
parent | bae92681be97191edda90990e08b5275d187107f (diff) | |
download | rails-92fada9b8c10b75d88190938ea2fd5a92277697b.tar.gz rails-92fada9b8c10b75d88190938ea2fd5a92277697b.tar.bz2 rails-92fada9b8c10b75d88190938ea2fd5a92277697b.zip |
Merge pull request #8855 from dylanahsmith/parse-non-object-json-params
Fix json params parsing regression for non-object JSON content.
Diffstat (limited to 'actionpack/test/dispatch/request/json_params_parsing_test.rb')
-rw-r--r-- | actionpack/test/dispatch/request/json_params_parsing_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/request/json_params_parsing_test.rb b/actionpack/test/dispatch/request/json_params_parsing_test.rb index 2c4a6c2147..7d3fc84089 100644 --- a/actionpack/test/dispatch/request/json_params_parsing_test.rb +++ b/actionpack/test/dispatch/request/json_params_parsing_test.rb @@ -122,6 +122,13 @@ class RootLessJSONParamsParsingTest < ActionDispatch::IntegrationTest ) end + test "parses json with non-object JSON content" do + assert_parses( + {"user" => {"_json" => "string content" }, "_json" => "string content" }, + "\"string content\"", { 'CONTENT_TYPE' => 'application/json' } + ) + end + private def assert_parses(expected, actual, headers = {}) with_test_routing(UsersController) do |