From: Toshi MARUYAMA Date: Sun, 2 Feb 2014 11:41:17 +0000 (+0000) Subject: scm: mercurial: split test_parents to sub method (#14361) X-Git-Tag: 2.5.0~130 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=da071e5531d43f94b28b9043324e2688f3001b80;p=redmine.git scm: mercurial: split test_parents to sub method (#14361) git-svn-id: http://svn.redmine.org/redmine/trunk@12770 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/test/unit/repository_mercurial_test.rb b/test/unit/repository_mercurial_test.rb index 1a861ca5d..d2efd848a 100644 --- a/test/unit/repository_mercurial_test.rb +++ b/test/unit/repository_mercurial_test.rb @@ -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,