]> source.dussan.org Git - redmine.git/commitdiff
cleanup: rubocop: fix Layout/IndentFirstArrayElement in RepositoryGitTest#test_latest...
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 21 Nov 2019 12:46:19 +0000 (12:46 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 21 Nov 2019 12:46:19 +0000 (12:46 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@19138 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/repository_git_test.rb

index 0f5382a410ed706843c871afeab6bdff79375535..bfd1dfa759e755934e6dcacf3a73f2825ca5563f 100644 (file)
@@ -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