scm: mercurial: code clean up unit model test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4991 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
bc09628249
commit
cc210c58a4
@ -28,7 +28,7 @@ class RepositoryMercurialTest < ActiveSupport::TestCase
|
|||||||
@repository = Repository::Mercurial.create(:project => @project, :url => REPOSITORY_PATH)
|
@repository = Repository::Mercurial.create(:project => @project, :url => REPOSITORY_PATH)
|
||||||
assert @repository
|
assert @repository
|
||||||
end
|
end
|
||||||
|
|
||||||
if File.directory?(REPOSITORY_PATH)
|
if File.directory?(REPOSITORY_PATH)
|
||||||
def test_fetch_changesets_from_scratch
|
def test_fetch_changesets_from_scratch
|
||||||
@repository.fetch_changesets
|
@repository.fetch_changesets
|
||||||
@ -38,7 +38,7 @@ class RepositoryMercurialTest < ActiveSupport::TestCase
|
|||||||
assert_equal "Initial import.\nThe repository contains 3 files.",
|
assert_equal "Initial import.\nThe repository contains 3 files.",
|
||||||
@repository.changesets.find_by_revision('0').comments
|
@repository.changesets.find_by_revision('0').comments
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_fetch_changesets_incremental
|
def test_fetch_changesets_incremental
|
||||||
@repository.fetch_changesets
|
@repository.fetch_changesets
|
||||||
# Remove changesets with revision > 2
|
# Remove changesets with revision > 2
|
||||||
@ -49,7 +49,7 @@ class RepositoryMercurialTest < ActiveSupport::TestCase
|
|||||||
@repository.fetch_changesets
|
@repository.fetch_changesets
|
||||||
assert_equal 17, @repository.changesets.count
|
assert_equal 17, @repository.changesets.count
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_isodatesec
|
def test_isodatesec
|
||||||
# Template keyword 'isodatesec' supported in Mercurial 1.0 and higher
|
# Template keyword 'isodatesec' supported in Mercurial 1.0 and higher
|
||||||
if @repository.scm.class.client_version_above?([1, 0])
|
if @repository.scm.class.client_version_above?([1, 0])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user