From e1189c5335b99803a923992016501b08d14864d1 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 5 Jan 2014 16:35:59 +0000 Subject: 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 --- test/unit/lib/redmine/mime_type_test.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/unit/lib') 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 -- cgit v1.2.3