##// END OF EJS Templates
scm: cvs: update test repository....
Toshi MARUYAMA -
r5331:d43bc98a497a
parent child
Show More
1 NO CONTENT: modified file, binary diff hidden
@@ -27,7 +27,7 begin
27 27 @adapter.revisions('', nil, nil, :with_paths => true) do |revision|
28 28 cnt += 1
29 29 end
30 assert_equal 14, cnt
30 assert_equal 16, cnt
31 31 end
32 32
33 33 def test_revisions_from_rev3
@@ -36,7 +36,7 begin
36 36 @adapter.revisions('', rev3_committed_on, nil, :with_paths => true) do |revision|
37 37 cnt += 1
38 38 end
39 assert_equal 2, cnt
39 assert_equal 4, cnt
40 40 end
41 41
42 42 def test_entries_rev3
@@ -24,7 +24,8 class RepositoryCvsTest < ActiveSupport::TestCase
24 24 REPOSITORY_PATH = RAILS_ROOT.gsub(%r{config\/\.\.}, '') + '/tmp/test/cvs_repository'
25 25 REPOSITORY_PATH.gsub!(/\//, "\\") if Redmine::Platform.mswin?
26 26 # CVS module
27 MODULE_NAME = 'test'
27 MODULE_NAME = 'test'
28 CHANGESETS_NUM = 7
28 29
29 30 def setup
30 31 @project = Project.find(3)
@@ -41,8 +42,8 class RepositoryCvsTest < ActiveSupport::TestCase
41 42 @repository.fetch_changesets
42 43 @repository.reload
43 44
44 assert_equal 5, @repository.changesets.count
45 assert_equal 14, @repository.changes.count
45 assert_equal CHANGESETS_NUM, @repository.changesets.count
46 assert_equal 16, @repository.changes.count
46 47 assert_not_nil @repository.changesets.find_by_comments('Two files changed')
47 48
48 49 r2 = @repository.changesets.find_by_revision('2')
@@ -69,10 +70,10 class RepositoryCvsTest < ActiveSupport::TestCase
69 70
70 71 @repository.fetch_changesets
71 72 @repository.reload
72 assert_equal 5, @repository.changesets.count
73 assert_equal CHANGESETS_NUM, @repository.changesets.count
73 74
74 assert_equal %w|5 4 3 2 1|, @repository.changesets.collect(&:revision)
75 rev5_commit = @repository.changesets.find(:first, :order => 'committed_on DESC')
75 assert_equal %w|7 6 5 4 3 2 1|, @repository.changesets.collect(&:revision)
76 rev5_commit = @repository.changesets.find_by_revision('5')
76 77 assert_equal 'HEAD-20071213-163001', rev5_commit.scmid
77 78 # 2007-12-14 01:30:01 +0900
78 79 rev5_committed_on = Time.gm(2007, 12, 13, 16, 30, 1)
@@ -83,7 +84,7 class RepositoryCvsTest < ActiveSupport::TestCase
83 84 assert_equal 0, @repository.changesets.count
84 85 @repository.fetch_changesets
85 86 @repository.reload
86 assert_equal 5, @repository.changesets.count
87 assert_equal CHANGESETS_NUM, @repository.changesets.count
87 88
88 89 entries = @repository.entries('sources')
89 90 assert entries.detect {|e| e.name == 'watchers_controller.rb'}
@@ -121,7 +122,7 class RepositoryCvsTest < ActiveSupport::TestCase
121 122 buf = @repository.cat('README')
122 123 assert buf
123 124 lines = buf.split("\n")
124 assert_equal 2, lines.length
125 assert_equal 3, lines.length
125 126 buf = lines[1].gsub(/\r$/, "")
126 127 assert_equal 'with one change', buf
127 128 buf = @repository.cat('README', '1')
@@ -145,7 +146,7 class RepositoryCvsTest < ActiveSupport::TestCase
145 146 @repository.reload
146 147 ann = @repository.annotate('README')
147 148 assert ann
148 assert_equal 2, ann.revisions.length
149 assert_equal 3, ann.revisions.length
149 150 assert_equal '1.2', ann.revisions[1].revision
150 151 assert_equal 'LANG', ann.revisions[1].author
151 152 assert_equal 'with one change', ann.lines[1]
General Comments 0
You need to be logged in to leave comments. Login now