diff options
author | Arthur Neves <arthurnn@gmail.com> | 2014-01-23 21:56:28 -0500 |
---|---|---|
committer | Arthur Neves <arthurnn@gmail.com> | 2014-01-23 21:56:28 -0500 |
commit | 96dd3016d1797e9ef6b59bce57f1baa5fd2a2210 (patch) | |
tree | 4cb7b94ec4622e5b2dca1fd0f645f80c331f435f /actionpack/test | |
parent | a7680ab47ddaf3f963824a72a130e2b18fbd1195 (diff) | |
download | rails-96dd3016d1797e9ef6b59bce57f1baa5fd2a2210.tar.gz rails-96dd3016d1797e9ef6b59bce57f1baa5fd2a2210.tar.bz2 rails-96dd3016d1797e9ef6b59bce57f1baa5fd2a2210.zip |
test boolean and number json param parsing
Diffstat (limited to 'actionpack/test')
-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 dba9ab688f..c609075e6b 100644 --- a/actionpack/test/dispatch/request/json_params_parsing_test.rb +++ b/actionpack/test/dispatch/request/json_params_parsing_test.rb @@ -23,6 +23,13 @@ class JsonParamsParsingTest < ActionDispatch::IntegrationTest ) end + test "parses boolean and number json params for application json" do + assert_parses( + {"item" => {"enabled" => false, "count" => 10}}, + "{\"item\": {\"enabled\": false, \"count\": 10}}", { 'CONTENT_TYPE' => 'application/json' } + ) + end + test "parses json params for application jsonrequest" do assert_parses( {"person" => {"name" => "David"}}, |