scm: mercurial: split test_parents to sub method (#14361)
git-svn-id: http://svn.redmine.org/redmine/trunk@12770 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
4bde749d40
commit
da071e5531
|
@ -422,11 +422,7 @@ class RepositoryMercurialTest < ActiveSupport::TestCase
|
|||
end
|
||||
end
|
||||
|
||||
def test_parents
|
||||
assert_equal 0, @repository.changesets.count
|
||||
@repository.fetch_changesets
|
||||
@project.reload
|
||||
assert_equal NUM_REV, @repository.changesets.count
|
||||
def assert_parents
|
||||
r1 = @repository.changesets.find_by_revision('0')
|
||||
assert_equal [], r1.parents
|
||||
r2 = @repository.changesets.find_by_revision('1')
|
||||
|
@ -439,6 +435,15 @@ class RepositoryMercurialTest < ActiveSupport::TestCase
|
|||
assert_equal "3a330eb32958", r4[0]
|
||||
assert_equal "a94b0528f24f", r4[1]
|
||||
end
|
||||
private :assert_parents
|
||||
|
||||
def test_parents_short_id
|
||||
assert_equal 0, @repository.changesets.count
|
||||
@repository.fetch_changesets
|
||||
@project.reload
|
||||
assert_equal NUM_REV, @repository.changesets.count
|
||||
assert_parents
|
||||
end
|
||||
|
||||
def test_activities
|
||||
c = Changeset.new(:repository => @repository,
|
||||
|
|
Loading…
Reference in New Issue