cleanup: rubocop: fix Layout/IndentFirstArrayElement in test/unit/project_test.rb

git-svn-id: http://svn.redmine.org/redmine/trunk@19243 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA
2019-11-24 05:45:02 +00:00
parent 3f6d9f74f7
commit 0957e56209
2 changed files with 11 additions and 5 deletions

View File

@@ -158,7 +158,6 @@ Layout/IndentFirstArrayElement:
- 'test/functional/repositories_mercurial_controller_test.rb' - 'test/functional/repositories_mercurial_controller_test.rb'
- 'test/unit/lib/redmine/scm/adapters/git_adapter_test.rb' - 'test/unit/lib/redmine/scm/adapters/git_adapter_test.rb'
- 'test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb' - 'test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb'
- 'test/unit/project_test.rb'
- 'test/unit/version_test.rb' - 'test/unit/version_test.rb'
# Cop supports --auto-correct. # Cop supports --auto-correct.

View File

@@ -1061,10 +1061,17 @@ class ProjectTest < ActiveSupport::TestCase
assert_equal 'value1', project.custom_field_value(cf1) assert_equal 'value1', project.custom_field_value(cf1)
assert_nil project.custom_field_value(cf2) assert_nil project.custom_field_value(cf2)
project.send :safe_attributes=, {'custom_fields' => [ project.send(
{'id' => cf1.id.to_s, 'value' => 'valuea'}, :safe_attributes=,
{'id' => cf2.id.to_s, 'value' => 'valueb'} {
]}, user 'custom_fields' =>
[
{'id' => cf1.id.to_s, 'value' => 'valuea'},
{'id' => cf2.id.to_s, 'value' => 'valueb'}
]
},
user
)
assert_equal 'valuea', project.custom_field_value(cf1) assert_equal 'valuea', project.custom_field_value(cf1)
assert_nil project.custom_field_value(cf2) assert_nil project.custom_field_value(cf2)
end end