diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-01-05 16:35:59 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-01-05 16:35:59 +0000 |
commit | e1189c5335b99803a923992016501b08d14864d1 (patch) | |
tree | d5d69435f167a5532c20b8a1432cebf71c9f5615 /test/unit/lib | |
parent | 1f5086258616239fd7998012f6efab685089fca5 (diff) | |
download | redmine-e1189c5335b99803a923992016501b08d14864d1.tar.gz redmine-e1189c5335b99803a923992016501b08d14864d1.zip |
Use the mime-types gem for getting mime types from filenames (#15790).
git-svn-id: http://svn.redmine.org/redmine/trunk@12483 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/lib')
-rw-r--r-- | test/unit/lib/redmine/mime_type_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/unit/lib/redmine/mime_type_test.rb b/test/unit/lib/redmine/mime_type_test.rb index 2a111edef..d44f9fe87 100644 --- a/test/unit/lib/redmine/mime_type_test.rb +++ b/test/unit/lib/redmine/mime_type_test.rb @@ -58,4 +58,9 @@ class Redmine::MimeTypeTest < ActiveSupport::TestCase assert_equal expected, Redmine::MimeType.is_type?(*args) end end + + def test_should_default_to_mime_type_gem + assert !Redmine::MimeType::EXTENSIONS.keys.include?("zip") + assert_equal "application/zip", Redmine::MimeType.of("file.zip") + end end |