aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorMichael Koziarski <michael@koziarski.com>2008-01-20 22:55:25 +0000
committerMichael Koziarski <michael@koziarski.com>2008-01-20 22:55:25 +0000
commit250a1194b91e6ddb3e2e80d48753a1591992164b (patch)
tree70d1fbba378c76a9ccdacac0e855d6b4c187f324 /actionpack/test
parent88bc014acc82129e55a7ae7505cb62bacd0d685d (diff)
downloadrails-250a1194b91e6ddb3e2e80d48753a1591992164b.tar.gz
rails-250a1194b91e6ddb3e2e80d48753a1591992164b.tar.bz2
rails-250a1194b91e6ddb3e2e80d48753a1591992164b.zip
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
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/controller/mime_type_test.rb5
1 files changed, 5 insertions, 0 deletions
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|