diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2016-11-13 23:08:19 -0500 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2016-11-13 23:09:08 -0500 |
commit | 5f3222155957e887516ffd4be58c4743553415b5 (patch) | |
tree | 591328d042686230b1ffcb502aaa79a8df44d79b /actionpack/test/controller | |
parent | f1c5b0bd0a6211286bfbb8f46991de325d45a2e5 (diff) | |
parent | 773f71c8a0d61a01b8afcc7359e0364a1f2a1bce (diff) | |
download | rails-5f3222155957e887516ffd4be58c4743553415b5.tar.gz rails-5f3222155957e887516ffd4be58c4743553415b5.tar.bz2 rails-5f3222155957e887516ffd4be58c4743553415b5.zip |
Merge pull request #27007 from maclover7/jm-fix-26912
Don't error on an empty CONTENT_TYPE
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r-- | actionpack/test/controller/params_wrapper_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/actionpack/test/controller/params_wrapper_test.rb b/actionpack/test/controller/params_wrapper_test.rb index 1549405fe7..46a2ab8ccf 100644 --- a/actionpack/test/controller/params_wrapper_test.rb +++ b/actionpack/test/controller/params_wrapper_test.rb @@ -212,6 +212,16 @@ class ParamsWrapperTest < ActionController::TestCase ) end end + + def test_handles_empty_content_type + with_default_wrapper_options do + @request.env["CONTENT_TYPE"] = nil + _controller_class.dispatch(:parse, @request, @response) + + assert_equal 200, @response.status + assert_equal "", @response.body + end + end end class NamespacedParamsWrapperTest < ActionController::TestCase |