]> source.dussan.org Git - redmine.git/commitdiff
scm: mercurial: split test_parents to sub method (#14361)
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 2 Feb 2014 11:41:17 +0000 (11:41 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 2 Feb 2014 11:41:17 +0000 (11:41 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@12770 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/repository_mercurial_test.rb

index 1a861ca5d01aa0cc631e276b62aa6e8ba68cd0ab..d2efd848a13450a791700c8ceb62f74d5264ed2c 100644 (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,