]> source.dussan.org Git - redmine.git/commitdiff
remove unneeded Relation#all from RepositoryCvsTest
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 9 Jan 2014 09:54:37 +0000 (09:54 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 9 Jan 2014 09:54:37 +0000 (09:54 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@12574 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/repository_cvs_test.rb

index d21aad6ea1db7b0e078f2f5fd3af8992c3b94696..366c6b2410340b5e3bb7002bf4695b6033416e3c 100644 (file)
@@ -116,11 +116,11 @@ class RepositoryCvsTest < ActiveSupport::TestCase
       assert_equal CHANGESETS_NUM, @repository.changesets.count
 
       # Remove changesets with revision > 3
-      @repository.changesets.all.each {|c| c.destroy if c.revision.to_i > 3}
+      @repository.changesets.each {|c| c.destroy if c.revision.to_i > 3}
       @project.reload
       @repository.reload
       assert_equal 3, @repository.changesets.count
-      assert_equal %w|3 2 1|, @repository.changesets.all.collect(&:revision)
+      assert_equal %w|3 2 1|, @repository.changesets.collect(&:revision)
 
       rev3_commit = @repository.changesets.reorder('committed_on DESC').first
       assert_equal '3', rev3_commit.revision
@@ -133,8 +133,9 @@ class RepositoryCvsTest < ActiveSupport::TestCase
 
       @repository.fetch_changesets
       @project.reload
+      @repository.reload
       assert_equal CHANGESETS_NUM, @repository.changesets.count
-      assert_equal %w|7 6 5 4 3 2 1|, @repository.changesets.all.collect(&:revision)
+      assert_equal %w|7 6 5 4 3 2 1|, @repository.changesets.collect(&:revision)
       rev5_commit = @repository.changesets.find_by_revision('5')
       assert_equal 'HEAD-20071213-163001', rev5_commit.scmid
        # 2007-12-14 01:30:01 +0900