From 84852c2eb5ec5f18cf0048f3b4367d29326ad28b Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sun, 24 Nov 2019 16:46:47 +0000 Subject: [PATCH] cleanup: rubocop: fix Layout/MultilineHashBraceLayout in test/unit/lib/redmine/mime_type_test.rb git-svn-id: http://svn.redmine.org/redmine/trunk@19281 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/lib/redmine/mime_type_test.rb | 38 ++++++++++++++----------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/test/unit/lib/redmine/mime_type_test.rb b/test/unit/lib/redmine/mime_type_test.rb index 5612f72e3..42a410a31 100644 --- a/test/unit/lib/redmine/mime_type_test.rb +++ b/test/unit/lib/redmine/mime_type_test.rb @@ -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 -- 2.39.5