scm: cvs: add cat test in unit model test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5394 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
71360a0f66
commit
51242b967d
@ -101,6 +101,22 @@ class RepositoryCvsTest < ActiveSupport::TestCase
|
|||||||
assert_equal entries[2].lastrev.revision, '3'
|
assert_equal entries[2].lastrev.revision, '3'
|
||||||
assert_equal entries[2].lastrev.author, 'LANG'
|
assert_equal entries[2].lastrev.author, 'LANG'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_cat
|
||||||
|
@repository.fetch_changesets
|
||||||
|
@repository.reload
|
||||||
|
buf = @repository.cat('README')
|
||||||
|
assert buf
|
||||||
|
lines = buf.split("\n")
|
||||||
|
assert_equal 2, lines.length
|
||||||
|
assert_equal 'with one change', lines[1]
|
||||||
|
buf = @repository.cat('README', 1)
|
||||||
|
assert buf
|
||||||
|
lines = buf.split("\n")
|
||||||
|
assert_equal 1, lines.length
|
||||||
|
assert_equal 'CVS test repository', lines[0]
|
||||||
|
assert_nil @repository.scm.cat('missing.rb')
|
||||||
|
end
|
||||||
else
|
else
|
||||||
puts "CVS test repository NOT FOUND. Skipping unit tests !!!"
|
puts "CVS test repository NOT FOUND. Skipping unit tests !!!"
|
||||||
def test_fake; assert true end
|
def test_fake; assert true end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user