Skip to content

Instantly share code, notes, and snippets.

@paul
Created November 17, 2009 17:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paul/237075 to your computer and use it in GitHub Desktop.
Save paul/237075 to your computer and use it in GitHub Desktop.
diff --git a/actionpack/test/dispatch/request_test.rb b/actionpack/test/dispatch/request_test.rb
index b62df9a..e1e7383 100644
--- a/actionpack/test/dispatch/request_test.rb
+++ b/actionpack/test/dispatch/request_test.rb
@@ -436,6 +436,9 @@ class RequestTest < ActiveSupport::TestCase
request = stub_request
request.expects(:parameters).at_least_once.returns({ :format => :unknown })
assert request.formats.empty?
+
+ request = stub_request 'HTTP_ACCEPT' => 'application/xml, application/json'
+ assert_equal [ Mime::XML, Mime::JSON ], request.formats
end
test "negotiate_mime" do
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment