]> source.dussan.org Git - redmine.git/commitdiff
cleanup: rubocop: fix Layout/IndentFirstArrayElement in test/unit/issue_test.rb
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 24 Nov 2019 05:44:51 +0000 (05:44 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 24 Nov 2019 05:44:51 +0000 (05:44 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@19242 e93f8b46-1217-0410-a6f0-8f06a7374b81

.rubocop_todo.yml
test/unit/issue_test.rb

index 0dfe853468d674cc5ff2768a12f7dab241739c70..ee9d47c5460d143a30ac7abb99134c2bbece9f91 100644 (file)
@@ -156,7 +156,6 @@ Layout/IndentFirstArrayElement:
     - 'lib/redmine/wiki_formatting/textile/redcloth3.rb'
     - 'test/functional/auth_sources_controller_test.rb'
     - 'test/functional/repositories_mercurial_controller_test.rb'
-    - 'test/unit/issue_test.rb'
     - 'test/unit/lib/redmine/scm/adapters/git_adapter_test.rb'
     - 'test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb'
     - 'test/unit/project_test.rb'
index d6008938db380a5dff60600e64c9efcc4741e4d9..3203e2a3fa30799ad5d769ac49a17abf1a4cfcff 100644 (file)
@@ -959,10 +959,16 @@ class IssueTest < ActiveSupport::TestCase
     assert_equal 'value1', issue.custom_field_value(cf1)
     assert_nil issue.custom_field_value(cf2)
 
-    issue.send :safe_attributes=, {'custom_fields' => [
-                                      {'id' => cf1.id.to_s, 'value' => 'valuea'},
-                                      {'id' => cf2.id.to_s, 'value' => 'valueb'}
-                                    ]}, user
+    issue.send(
+      :safe_attributes=,
+      {
+        'custom_fields' =>
+          [
+            {'id' => cf1.id.to_s, 'value' => 'valuea'},
+            {'id' => cf2.id.to_s, 'value' => 'valueb'}
+          ]
+      }, user
+    )
     assert_equal 'valuea', issue.custom_field_value(cf1)
     assert_nil issue.custom_field_value(cf2)
   end
@@ -2986,9 +2992,7 @@ class IssueTest < ActiveSupport::TestCase
   def test_save_attachments_with_array_should_warn_about_missing_tokens
     set_tmp_attachments_directory
     issue = Issue.generate!
-    issue.save_attachments([
-      {'token' => 'missing'}
-    ])
+    issue.save_attachments([{'token' => 'missing'}])
     assert !issue.save
     assert issue.errors[:base].present?
     assert_equal 0, issue.reload.attachments.count