Browse files

Koz asked to test something crazy.

  • Loading branch information...
1 parent 83e35b9 commit 11db2ae4e0f6e60c9619a808350c1550c4c78c89 @josevalim josevalim committed May 2, 2011
Showing with 12 additions and 0 deletions.
  1. +12 −0 actionpack/test/dispatch/request_test.rb
View
12 actionpack/test/dispatch/request_test.rb
@@ -460,6 +460,18 @@ def url_for(options = {})
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({})

0 comments on commit 11db2ae

Please sign in to comment.