diff options
author | José Valim <jose.valim@gmail.com> | 2011-05-02 23:44:23 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-05-02 23:45:24 +0200 |
commit | 11db2ae4e0f6e60c9619a808350c1550c4c78c89 (patch) | |
tree | 83df9926cb1ffd44b4b6813a00b646ba2ec94ca1 /actionpack | |
parent | 83e35b9c08b97db7605542e69a8fa8d23c7df211 (diff) | |
download | rails-11db2ae4e0f6e60c9619a808350c1550c4c78c89.tar.gz rails-11db2ae4e0f6e60c9619a808350c1550c4c78c89.tar.bz2 rails-11db2ae4e0f6e60c9619a808350c1550c4c78c89.zip |
Koz asked to test something crazy.
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/test/dispatch/request_test.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/request_test.rb b/actionpack/test/dispatch/request_test.rb index 86bbbab175..fb2faf7a4e 100644 --- a/actionpack/test/dispatch/request_test.rb +++ b/actionpack/test/dispatch/request_test.rb @@ -460,6 +460,18 @@ class RequestTest < ActiveSupport::TestCase request.expects(:parameters).at_least_once.returns({}) assert_equal [ Mime::HTML ], request.formats + request = stub_request 'HTTP_ACCEPT' => 'koz-asked/something-crazy' + request.expects(:parameters).at_least_once.returns({}) + assert_equal [ Mime::HTML ], request.formats + + request = stub_request 'HTTP_ACCEPT' => '*/*;q=0.1' + request.expects(:parameters).at_least_once.returns({}) + assert_equal [ Mime::HTML ], request.formats + + request = stub_request 'HTTP_ACCEPT' => 'application/jxw' + request.expects(:parameters).at_least_once.returns({}) + assert_equal [ Mime::HTML ], request.formats + request = stub_request 'HTTP_ACCEPT' => 'application/xml', 'HTTP_X_REQUESTED_WITH' => "XMLHttpRequest" request.expects(:parameters).at_least_once.returns({}) |