diff options
author | Go MAEDA <maeda@farend.jp> | 2018-08-15 13:20:45 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2018-08-15 13:20:45 +0000 |
commit | bd08684e1d60fff654d347a390802d0ad3b6c42b (patch) | |
tree | 319a6f54f3e386ae63a0a96ea6e8e07e3e909371 /test/unit/lib | |
parent | 371d84556f086b61328c1e738edbe7642ecd15aa (diff) | |
download | redmine-bd08684e1d60fff654d347a390802d0ad3b6c42b.tar.gz redmine-bd08684e1d60fff654d347a390802d0ad3b6c42b.zip |
Test that Redmine::MimeType.css_class_of, main_mimetype_of and is_type? are case-insensitive (#29359).
git-svn-id: http://svn.redmine.org/redmine/trunk@17472 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/lib')
-rw-r--r-- | test/unit/lib/redmine/mime_type_test.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/unit/lib/redmine/mime_type_test.rb b/test/unit/lib/redmine/mime_type_test.rb index 017b61272..bad26dd48 100644 --- a/test/unit/lib/redmine/mime_type_test.rb +++ b/test/unit/lib/redmine/mime_type_test.rb @@ -36,6 +36,7 @@ class Redmine::MimeTypeTest < ActiveSupport::TestCase def test_css_class_of to_test = {'test.txt' => 'text-plain', 'test.c' => 'text-x-c', + 'TEST.JPG' => 'image-jpeg', } to_test.each do |name, expected| assert_equal expected, Redmine::MimeType.css_class_of(name) @@ -49,6 +50,7 @@ class Redmine::MimeTypeTest < ActiveSupport::TestCase def test_main_mimetype_of to_test = {'test.txt' => 'text', 'test.c' => 'text', + 'TEST.JPG' => 'image', } to_test.each do |name, expected| assert_equal expected, Redmine::MimeType.main_mimetype_of(name) @@ -63,6 +65,7 @@ class Redmine::MimeTypeTest < ActiveSupport::TestCase to_test = {['text', 'test.unk'] => false, ['text', 'test.txt'] => true, ['text', 'test.c'] => true, + ['image', 'TEST.JPG'] => true, } to_test.each do |args, expected| assert_equal expected, Redmine::MimeType.is_type?(*args) |