diff options
author | Michael Koziarski <michael@koziarski.com> | 2008-11-13 11:19:53 +0100 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2008-11-13 11:23:34 +0100 |
commit | f1ad8b48aae3ee26613b3e77bc0056e120096846 (patch) | |
tree | 6df93a9c456ee4bcb91ca33d57957ae7d838d4f1 /actionpack/test/controller | |
parent | 00c46b5eeb858629ef1c7ab50f022aecccca42c3 (diff) | |
download | rails-f1ad8b48aae3ee26613b3e77bc0056e120096846.tar.gz rails-f1ad8b48aae3ee26613b3e77bc0056e120096846.tar.bz2 rails-f1ad8b48aae3ee26613b3e77bc0056e120096846.zip |
Instead of overriding html_types, base the verification on browser_generated_types.
Also Deprecate the old unverifiable types.
[#1145 state:committed]
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r-- | actionpack/test/controller/mime_type_test.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/test/controller/mime_type_test.rb b/actionpack/test/controller/mime_type_test.rb index 4cfaf38ac7..21ae0419f1 100644 --- a/actionpack/test/controller/mime_type_test.rb +++ b/actionpack/test/controller/mime_type_test.rb @@ -77,8 +77,8 @@ class MimeTypeTest < Test::Unit::TestCase all_types.uniq! # Remove custom Mime::Type instances set in other tests, like Mime::GIF and Mime::IPHONE all_types.delete_if { |type| !Mime.const_defined?(type.to_s.upcase) } - verified, unverified = all_types.partition { |type| Mime::Type.html_types.include? type } - assert verified.each { |type| assert Mime.const_get(type.to_s.upcase).verify_request?, "Mime Type is not verified: #{type.inspect}" } - assert unverified.each { |type| assert !Mime.const_get(type.to_s.upcase).verify_request?, "Mime Type is verified: #{type.inspect}" } + verified, unverified = all_types.partition { |type| Mime::Type.browser_generated_types.include? type } + assert verified.each { |type| assert Mime.const_get(type.to_s.upcase).verify_request?, "Verifiable Mime Type is not verified: #{type.inspect}" } + assert unverified.each { |type| assert !Mime.const_get(type.to_s.upcase).verify_request?, "Nonverifiable Mime Type is verified: #{type.inspect}" } end end |