]> source.dussan.org Git - redmine.git/commitdiff
cleanup: rubocop: fix Layout/IndentFirstHashElement in test/unit/issue_test.rb
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 23 Nov 2019 14:28:03 +0000 (14:28 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 23 Nov 2019 14:28:03 +0000 (14:28 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@19204 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/issue_test.rb

index caeb2f324280e6b4f250816e9a673137f64909a3..095d97589c8409d91335d14786dd0dad07a40c88 100644 (file)
@@ -945,9 +945,17 @@ class IssueTest < ActiveSupport::TestCase
     assert_equal [cf2.id.to_s], issue.read_only_attribute_names(user)
     assert_not_include cf2.id.to_s, issue.safe_attribute_names(user)
 
-    issue.send :safe_attributes=, {'custom_field_values' => {
-                                       cf1.id.to_s => 'value1', cf2.id.to_s => 'value2'
-                                     }}, user
+    issue.send(
+      :safe_attributes=,
+      {
+        'custom_field_values' =>
+          {
+            cf1.id.to_s => 'value1',
+            cf2.id.to_s => 'value2'
+          }
+      },
+      user
+    )
     assert_equal 'value1', issue.custom_field_value(cf1)
     assert_nil issue.custom_field_value(cf2)
 
@@ -2960,11 +2968,13 @@ class IssueTest < ActiveSupport::TestCase
   def test_save_attachments_with_hash_should_save_attachments_in_keys_order
     set_tmp_attachments_directory
     issue = Issue.generate!
-    issue.save_attachments({
-      'p0' => {'file' => mock_file_with_options(:original_filename => 'upload')},
-      '3' => {'file' => mock_file_with_options(:original_filename => 'bar')},
-      '1' => {'file' => mock_file_with_options(:original_filename => 'foo')}
-    })
+    issue.save_attachments(
+      {
+        'p0' => {'file' => mock_file_with_options(:original_filename => 'upload')},
+        '3' => {'file' => mock_file_with_options(:original_filename => 'bar')},
+        '1' => {'file' => mock_file_with_options(:original_filename => 'foo')}
+      }
+    )
     issue.attach_saved_attachments
 
     assert_equal 3, issue.reload.attachments.count