From f50db779fbd5e2ae5de6739441676bfa0165c865 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Thu, 21 Nov 2019 12:46:19 +0000 Subject: [PATCH] cleanup: rubocop: fix Layout/IndentFirstArrayElement in RepositoryGitTest#test_latest_changesets git-svn-id: http://svn.redmine.org/redmine/trunk@19138 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/repository_git_test.rb | 154 ++++++++++++++----------------- 1 file changed, 71 insertions(+), 83 deletions(-) diff --git a/test/unit/repository_git_test.rb b/test/unit/repository_git_test.rb index 0f5382a41..bfd1dfa75 100644 --- a/test/unit/repository_git_test.rb +++ b/test/unit/repository_git_test.rb @@ -363,110 +363,98 @@ class RepositoryGitTest < ActiveSupport::TestCase # with path changesets = @repository.latest_changesets('images', 'master') - assert_equal [ - 'deff712f05a90d96edbd70facc47d944be5897e3', - '899a15dba03a3b350b89c3f537e4bbe02a03cdc9', - '7234cb2750b63f47bff735edc50a1c0a433c2518', - ], changesets.collect(&:revision) - + assert_equal( + [ + 'deff712f05a90d96edbd70facc47d944be5897e3', + '899a15dba03a3b350b89c3f537e4bbe02a03cdc9', + '7234cb2750b63f47bff735edc50a1c0a433c2518', + ], changesets.collect(&:revision)) changesets = @repository.latest_changesets('README', nil) - assert_equal [ - '32ae898b720c2f7eec2723d5bdd558b4cb2d3ddf', - '4a07fe31bffcf2888791f3e6cbc9c4545cefe3e8', - '713f4944648826f558cf548222f813dabe7cbb04', - '61b685fbe55ab05b5ac68402d5720c1a6ac973d1', - '899a15dba03a3b350b89c3f537e4bbe02a03cdc9', - '7234cb2750b63f47bff735edc50a1c0a433c2518', - ], changesets.collect(&:revision) - + assert_equal( + [ + '32ae898b720c2f7eec2723d5bdd558b4cb2d3ddf', + '4a07fe31bffcf2888791f3e6cbc9c4545cefe3e8', + '713f4944648826f558cf548222f813dabe7cbb04', + '61b685fbe55ab05b5ac68402d5720c1a6ac973d1', + '899a15dba03a3b350b89c3f537e4bbe02a03cdc9', + '7234cb2750b63f47bff735edc50a1c0a433c2518', + ], changesets.collect(&:revision)) # with path, revision and limit changesets = @repository.latest_changesets('images', '899a15dba') - assert_equal [ - '899a15dba03a3b350b89c3f537e4bbe02a03cdc9', - '7234cb2750b63f47bff735edc50a1c0a433c2518', - ], changesets.collect(&:revision) - + assert_equal( + ['899a15dba03a3b350b89c3f537e4bbe02a03cdc9', + '7234cb2750b63f47bff735edc50a1c0a433c2518'], + changesets.collect(&:revision)) changesets = @repository.latest_changesets('images', '899a15dba', 1) - assert_equal [ - '899a15dba03a3b350b89c3f537e4bbe02a03cdc9', - ], changesets.collect(&:revision) - + assert_equal( + ['899a15dba03a3b350b89c3f537e4bbe02a03cdc9'], + changesets.collect(&:revision)) changesets = @repository.latest_changesets('README', '899a15dba') - assert_equal [ - '899a15dba03a3b350b89c3f537e4bbe02a03cdc9', - '7234cb2750b63f47bff735edc50a1c0a433c2518', - ], changesets.collect(&:revision) - + assert_equal( + ['899a15dba03a3b350b89c3f537e4bbe02a03cdc9', + '7234cb2750b63f47bff735edc50a1c0a433c2518'], + changesets.collect(&:revision)) changesets = @repository.latest_changesets('README', '899a15dba', 1) - assert_equal [ - '899a15dba03a3b350b89c3f537e4bbe02a03cdc9', - ], changesets.collect(&:revision) - + assert_equal( + ['899a15dba03a3b350b89c3f537e4bbe02a03cdc9'], + changesets.collect(&:revision)) # with path, tag and limit changesets = @repository.latest_changesets('images', 'tag01.annotated') - assert_equal [ - '899a15dba03a3b350b89c3f537e4bbe02a03cdc9', - '7234cb2750b63f47bff735edc50a1c0a433c2518', - ], changesets.collect(&:revision) - + assert_equal( + ['899a15dba03a3b350b89c3f537e4bbe02a03cdc9', + '7234cb2750b63f47bff735edc50a1c0a433c2518'], + changesets.collect(&:revision)) changesets = @repository.latest_changesets('images', 'tag01.annotated', 1) - assert_equal [ - '899a15dba03a3b350b89c3f537e4bbe02a03cdc9', - ], changesets.collect(&:revision) - + assert_equal( + ['899a15dba03a3b350b89c3f537e4bbe02a03cdc9'], + changesets.collect(&:revision)) changesets = @repository.latest_changesets('README', 'tag01.annotated') - assert_equal [ - '899a15dba03a3b350b89c3f537e4bbe02a03cdc9', - '7234cb2750b63f47bff735edc50a1c0a433c2518', - ], changesets.collect(&:revision) - + assert_equal( + ['899a15dba03a3b350b89c3f537e4bbe02a03cdc9', + '7234cb2750b63f47bff735edc50a1c0a433c2518'], + changesets.collect(&:revision)) changesets = @repository.latest_changesets('README', 'tag01.annotated', 1) - assert_equal [ - '899a15dba03a3b350b89c3f537e4bbe02a03cdc9', - ], changesets.collect(&:revision) - + assert_equal( + ['899a15dba03a3b350b89c3f537e4bbe02a03cdc9'], + changesets.collect(&:revision)) # with path, branch and limit changesets = @repository.latest_changesets('images', 'test_branch') - assert_equal [ - '899a15dba03a3b350b89c3f537e4bbe02a03cdc9', - '7234cb2750b63f47bff735edc50a1c0a433c2518', - ], changesets.collect(&:revision) - + assert_equal( + ['899a15dba03a3b350b89c3f537e4bbe02a03cdc9', + '7234cb2750b63f47bff735edc50a1c0a433c2518'], + changesets.collect(&:revision)) changesets = @repository.latest_changesets('images', 'test_branch', 1) - assert_equal [ - '899a15dba03a3b350b89c3f537e4bbe02a03cdc9', - ], changesets.collect(&:revision) - + assert_equal( + ['899a15dba03a3b350b89c3f537e4bbe02a03cdc9'], + changesets.collect(&:revision)) changesets = @repository.latest_changesets('README', 'test_branch') - assert_equal [ - '713f4944648826f558cf548222f813dabe7cbb04', - '61b685fbe55ab05b5ac68402d5720c1a6ac973d1', - '899a15dba03a3b350b89c3f537e4bbe02a03cdc9', - '7234cb2750b63f47bff735edc50a1c0a433c2518', - ], changesets.collect(&:revision) - + assert_equal( + [ + '713f4944648826f558cf548222f813dabe7cbb04', + '61b685fbe55ab05b5ac68402d5720c1a6ac973d1', + '899a15dba03a3b350b89c3f537e4bbe02a03cdc9', + '7234cb2750b63f47bff735edc50a1c0a433c2518', + ], changesets.collect(&:revision)) changesets = @repository.latest_changesets('README', 'test_branch', 2) - assert_equal [ - '713f4944648826f558cf548222f813dabe7cbb04', - '61b685fbe55ab05b5ac68402d5720c1a6ac973d1', - ], changesets.collect(&:revision) - + assert_equal( + ['713f4944648826f558cf548222f813dabe7cbb04', + '61b685fbe55ab05b5ac68402d5720c1a6ac973d1'], + changesets.collect(&:revision)) if WINDOWS_PASS puts WINDOWS_SKIP_STR else # latin-1 encoding path changesets = @repository.latest_changesets( 'latin-1-dir/test-Ü-2.txt', '64f1f3e89') - assert_equal [ - '64f1f3e89ad1cb57976ff0ad99a107012ba3481d', - '4fc55c43bf3d3dc2efb66145365ddc17639ce81e', - ], changesets.collect(&:revision) - + assert_equal( + ['64f1f3e89ad1cb57976ff0ad99a107012ba3481d', + '4fc55c43bf3d3dc2efb66145365ddc17639ce81e'], + changesets.collect(&:revision)) changesets = @repository.latest_changesets( 'latin-1-dir/test-Ü-2.txt', '64f1f3e89', 1) - assert_equal [ - '64f1f3e89ad1cb57976ff0ad99a107012ba3481d', - ], changesets.collect(&:revision) + assert_equal( + ['64f1f3e89ad1cb57976ff0ad99a107012ba3481d'], + changesets.collect(&:revision)) end end @@ -480,9 +468,9 @@ class RepositoryGitTest < ActiveSupport::TestCase assert_equal NUM_REV, @repository.changesets.count changesets = @repository.latest_changesets( 'latin-1-dir/test-Ü-subdir', '1ca7f5ed') - assert_equal [ - '1ca7f5ed374f3cb31a93ae5215c2e25cc6ec5127', - ], changesets.collect(&:revision) + assert_equal( + ['1ca7f5ed374f3cb31a93ae5215c2e25cc6ec5127'], + changesets.collect(&:revision)) end end -- 2.39.5