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:
Toshi MARUYAMA 2014-02-02 11:41:17 +00:00
parent 4bde749d40
commit da071e5531
1 changed files with 10 additions and 5 deletions

View File

@ -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,