##// END OF EJS Templates
Rails3: scm: darcs: fix error of test_fetch_changesets_incremental at unit model test...
Toshi MARUYAMA -
r6998:fa4a41a65383
parent child
Show More
@@ -45,14 +45,19 class RepositoryDarcsTest < ActiveSupport::TestCase
45 end
45 end
46
46
47 def test_fetch_changesets_incremental
47 def test_fetch_changesets_incremental
48 assert_equal 0, @repository.changesets.count
48 @repository.fetch_changesets
49 @repository.fetch_changesets
50 @project.reload
51 assert_equal NUM_REV, @repository.changesets.count
52
49 # Remove changesets with revision > 3
53 # Remove changesets with revision > 3
50 @repository.changesets.find(:all).each {|c| c.destroy if c.revision.to_i > 3}
54 @repository.changesets.find(:all).each {|c| c.destroy if c.revision.to_i > 3}
51 @repository.reload
55 @project.reload
52 assert_equal 3, @repository.changesets.count
56 assert_equal 3, @repository.changesets.count
53
57
54 @repository.fetch_changesets
58 @repository.fetch_changesets
55 assert_equal 6, @repository.changesets.count
59 @project.reload
60 assert_equal NUM_REV, @repository.changesets.count
56 end
61 end
57
62
58 def test_entries_invalid_revision
63 def test_entries_invalid_revision
General Comments 0
You need to be logged in to leave comments. Login now