]> source.dussan.org Git - redmine.git/commitdiff
cleanup: rubocop: fix Layout/MultilineHashBraceLayout in test/unit/lib/redmine/mime_t...
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 24 Nov 2019 16:46:47 +0000 (16:46 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 24 Nov 2019 16:46:47 +0000 (16:46 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@19281 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/lib/redmine/mime_type_test.rb

index 5612f72e3057bd74724c3b94d5c435239e615011..42a410a31e22fdf34bed4636d558d6f306a51822 100644 (file)
@@ -21,10 +21,11 @@ require File.expand_path('../../../../test_helper', __FILE__)
 
 class Redmine::MimeTypeTest < ActiveSupport::TestCase
   def test_of
-    to_test = {'test.txt' => 'text/plain',
-               'test.c' => 'text/x-c',
-               'TEST.JPG' => 'image/jpeg',
-               }
+    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.of(name)
     end
@@ -35,10 +36,11 @@ class Redmine::MimeTypeTest < ActiveSupport::TestCase
   end
 
   def test_css_class_of
-    to_test = {'test.txt' => 'text-plain',
-               'test.c' => 'text-x-c',
-               'TEST.JPG' => 'image-jpeg',
-               }
+    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)
     end
@@ -49,10 +51,11 @@ class Redmine::MimeTypeTest < ActiveSupport::TestCase
   end
 
   def test_main_mimetype_of
-    to_test = {'test.txt' => 'text',
-               'test.c' => 'text',
-               'TEST.JPG' => 'image',
-               }
+    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)
     end
@@ -63,11 +66,12 @@ class Redmine::MimeTypeTest < ActiveSupport::TestCase
   end
 
   def test_is_type
-    to_test = {['text', 'test.unk'] => false,
-               ['text', 'test.txt'] => true,
-               ['text', 'test.c'] => true,
-               ['image', 'TEST.JPG'] => true,
-               }
+    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)
     end