From 250a1194b91e6ddb3e2e80d48753a1591992164b Mon Sep 17 00:00:00 2001 From: Michael Koziarski Date: Sun, 20 Jan 2008 22:55:25 +0000 Subject: Ensure mime types can be compared with symbols. Closes #10796 [bscofield] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8677 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/test/controller/mime_type_test.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'actionpack/test') diff --git a/actionpack/test/controller/mime_type_test.rb b/actionpack/test/controller/mime_type_test.rb index 5f29393fce..991ac04f62 100644 --- a/actionpack/test/controller/mime_type_test.rb +++ b/actionpack/test/controller/mime_type_test.rb @@ -39,6 +39,11 @@ class MimeTypeTest < Test::Unit::TestCase Mime.module_eval { remove_const :GIF if const_defined?(:GIF) } end + def test_type_should_be_equal_to_symbol + assert_equal Mime::HTML, 'application/xhtml+xml' + assert_equal Mime::HTML, :html + end + def test_type_convenience_methods types = [:html, :xml, :png, :pdf, :yaml, :url_encoded_form] types.each do |type| -- cgit v1.2.3