Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix test to use Mime::Zip

  • Loading branch information...
commit 1b957177e777085082c46e620a9b96b49aebb5fd 1 parent 76581d0
@arunagw arunagw authored
View
6 actionpack/lib/action_dispatch/http/mime_types.rb
@@ -21,9 +21,6 @@
Mime::Type.register "application/atom+xml", :atom
Mime::Type.register "application/x-yaml", :yaml, %w( text/yaml )
-Mime::Type.register "application/pdf", :pdf, [], %w(pdf)
-Mime::Type.register "application/zip", :zip, [], %w(zip)
-
Mime::Type.register "multipart/form-data", :multipart_form
Mime::Type.register "application/x-www-form-urlencoded", :url_encoded_form
@@ -31,5 +28,8 @@
# http://www.json.org/JSONRequest.html
Mime::Type.register "application/json", :json, %w( text/x-json application/jsonrequest )
+Mime::Type.register "application/pdf", :pdf, [], %w(pdf)
+Mime::Type.register "application/zip", :zip, [], %w(zip)
+
# Create Mime::ALL but do not add it to the SET.
Mime::ALL = Mime::Type.new("*/*", :all, [])
View
2  actionpack/test/dispatch/mime_type_test.rb
@@ -52,7 +52,7 @@ class MimeTypeTest < ActiveSupport::TestCase
test "parse application with trailing star" do
accept = "application/*"
- expect = [Mime::HTML, Mime::JS, Mime::XML, Mime::RSS, Mime::ATOM, Mime::YAML, Mime::URL_ENCODED_FORM, Mime::JSON, Mime::PDF]
+ expect = [Mime::HTML, Mime::JS, Mime::XML, Mime::RSS, Mime::ATOM, Mime::YAML, Mime::URL_ENCODED_FORM, Mime::JSON, Mime::PDF, Mime::ZIP]
parsed = Mime::Type.parse(accept)
assert_equal expect, parsed
end
Please sign in to comment.
Something went wrong with that request. Please try again.