aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/dispatch/mime_type_test.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/actionpack/test/dispatch/mime_type_test.rb b/actionpack/test/dispatch/mime_type_test.rb
index 91f6f66fe3..68083ed747 100644
--- a/actionpack/test/dispatch/mime_type_test.rb
+++ b/actionpack/test/dispatch/mime_type_test.rb
@@ -18,7 +18,7 @@ class MimeTypeTest < ActiveSupport::TestCase
assert_equal Mime::Type[:MOBILE], Mime::EXTENSION_LOOKUP['mobile']
Mime::Type.unregister(:mobile)
- assert !Mime.const_defined?(:MOBILE), "Mime::MOBILE should not be defined"
+ assert !Mime::Type.registered?(:MOBILE), "Mime::MOBILE should not be defined"
assert !Mime::LOOKUP.has_key?('text/x-mobile'), "Mime::LOOKUP should not have key ['text/x-mobile]"
assert !Mime::EXTENSION_LOOKUP.has_key?('mobile'), "Mime::EXTENSION_LOOKUP should not have key ['mobile]"
ensure
@@ -183,6 +183,10 @@ class MimeTypeTest < ActiveSupport::TestCase
end
end
+ test "deprecated const_defined?" do
+ assert_deprecated { Mime.const_defined?(:ALL) }
+ end
+
test "verifiable mime types" do
all_types = Mime::SET.symbols
all_types.uniq!