Rails4: scm: reload repository after destroying changesets in incremental fetch test

git-svn-id: http://svn.redmine.org/redmine/trunk@12472 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2013-12-29 13:48:52 +00:00
parent e9470e5585
commit 9cefc90b0b
5 changed files with 5 additions and 0 deletions

View File

@ -107,6 +107,7 @@ class RepositoryBazaarTest < ActiveSupport::TestCase
# Remove changesets with revision > 5
@repository.changesets.all.each {|c| c.destroy if c.revision.to_i > 2}
@project.reload
@repository.reload
assert_equal 2, @repository.changesets.count
@repository.fetch_changesets

View File

@ -118,6 +118,7 @@ class RepositoryCvsTest < ActiveSupport::TestCase
# Remove changesets with revision > 3
@repository.changesets.all.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)

View File

@ -81,6 +81,7 @@ class RepositoryDarcsTest < ActiveSupport::TestCase
# Remove changesets with revision > 3
@repository.changesets.all.each {|c| c.destroy if c.revision.to_i > 3}
@project.reload
@repository.reload
assert_equal 3, @repository.changesets.count
@repository.fetch_changesets

View File

@ -104,6 +104,7 @@ class RepositoryMercurialTest < ActiveSupport::TestCase
# Remove changesets with revision > 2
@repository.changesets.all.each {|c| c.destroy if c.revision.to_i > 2}
@project.reload
@repository.reload
assert_equal 3, @repository.changesets.count
@repository.fetch_changesets

View File

@ -77,6 +77,7 @@ class RepositorySubversionTest < ActiveSupport::TestCase
# Remove changesets with revision > 5
@repository.changesets.all.each {|c| c.destroy if c.revision.to_i > 5}
@project.reload
@repository.reload
assert_equal 5, @repository.changesets.count
@repository.fetch_changesets