From bd0f849e08b12e7093359354bd1af16357c3a7f8 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sat, 23 Nov 2019 14:28:03 +0000 Subject: [PATCH] cleanup: rubocop: fix Layout/IndentFirstHashElement in test/unit/issue_test.rb git-svn-id: http://svn.redmine.org/redmine/trunk@19204 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/issue_test.rb | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/test/unit/issue_test.rb b/test/unit/issue_test.rb index caeb2f324..095d97589 100644 --- a/test/unit/issue_test.rb +++ b/test/unit/issue_test.rb @@ -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 -- 2.39.5