Browse files

Add test for register_alias

  • Loading branch information...
1 parent a87690b commit 27f3619cd5d3700b2ff16f7c153c3549316b9410 @justincampbell justincampbell committed Dec 17, 2011
Showing with 9 additions and 0 deletions.
  1. +9 −0 actionpack/test/dispatch/mime_type_test.rb
View
9 actionpack/test/dispatch/mime_type_test.rb
@@ -117,6 +117,15 @@ class MimeTypeTest < ActiveSupport::TestCase
end
end
+ test "register alias" do
+ begin
+ Mime::Type.register_alias "application/xhtml+xml", :foobar
+ assert_equal Mime::HTML, Mime::EXTENSION_LOOKUP['foobar']
+ ensure
+ Mime::Type.unregister(:FOOBAR)
+ end
+ end
+
test "type should be equal to symbol" do
assert_equal Mime::HTML, 'application/xhtml+xml'
assert_equal Mime::HTML, :html

0 comments on commit 27f3619

Please sign in to comment.