diff options
author | Konstantin Papkovskiy <konstantin@papkovskiy.com> | 2013-01-17 17:42:49 +0400 |
---|---|---|
committer | Konstantin Papkovskiy <konstantin@papkovskiy.com> | 2013-01-17 17:42:49 +0400 |
commit | bebb02fd1c5ea0e8da9fb61eefcbb6ec8b9ab11f (patch) | |
tree | 8f59d6803978d60b8481ce866dba7e6a34a02d60 /actionpack/test/dispatch | |
parent | ee314a5e5aa2b29978b78fbe1b272bcfff865d4a (diff) | |
download | rails-bebb02fd1c5ea0e8da9fb61eefcbb6ec8b9ab11f.tar.gz rails-bebb02fd1c5ea0e8da9fb61eefcbb6ec8b9ab11f.tar.bz2 rails-bebb02fd1c5ea0e8da9fb61eefcbb6ec8b9ab11f.zip |
Fix ActionDispatch::Request#formats when HTTP_ACCEPT header is empty string
Diffstat (limited to 'actionpack/test/dispatch')
-rw-r--r-- | actionpack/test/dispatch/request_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/request_test.rb b/actionpack/test/dispatch/request_test.rb index 39923d0d2b..8a01b29340 100644 --- a/actionpack/test/dispatch/request_test.rb +++ b/actionpack/test/dispatch/request_test.rb @@ -587,6 +587,10 @@ class RequestTest < ActiveSupport::TestCase request.expects(:parameters).at_least_once.returns({}) assert_equal [Mime::HTML], request.formats + request = stub_request 'HTTP_ACCEPT' => '' + request.expects(:parameters).at_least_once.returns({}) + assert_equal [Mime::HTML], request.formats + request = stub_request 'CONTENT_TYPE' => 'application/xml; charset=UTF-8', 'HTTP_X_REQUESTED_WITH' => "XMLHttpRequest" request.expects(:parameters).at_least_once.returns({}) |