diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-02-02 12:20:32 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-02-02 12:20:32 +0000 |
commit | f9e7c247331d6fb7022ad72bb2efcbb63517e8ca (patch) | |
tree | 653a7b6397f39daa11480f44750a488f1a082f51 /test/unit/repository_mercurial_test.rb | |
parent | 58d906446d0cbbbcdd913ce76561d3eae7bb5958 (diff) | |
download | redmine-f9e7c247331d6fb7022ad72bb2efcbb63517e8ca.tar.gz redmine-f9e7c247331d6fb7022ad72bb2efcbb63517e8ca.zip |
scm: mercurial: use scmid_for_assert in assert_parents (#14361)
git-svn-id: http://svn.redmine.org/redmine/trunk@12775 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/repository_mercurial_test.rb')
-rw-r--r-- | test/unit/repository_mercurial_test.rb | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/test/unit/repository_mercurial_test.rb b/test/unit/repository_mercurial_test.rb index a2ed8728c..654a846b1 100644 --- a/test/unit/repository_mercurial_test.rb +++ b/test/unit/repository_mercurial_test.rb @@ -433,18 +433,23 @@ class RepositoryMercurialTest < ActiveSupport::TestCase end end - def assert_parents + def assert_parents(is_short_scmid=true) r1 = @repository.changesets.find_by_revision('0') assert_equal [], r1.parents r2 = @repository.changesets.find_by_revision('1') + hex2 = "0885933ad4f68d77c2649cd11f8311276e7ef7ce" + scmid2 = scmid_for_assert(hex2, is_short_scmid) assert_equal 1, r2.parents.length - assert_equal "0885933ad4f6", - r2.parents[0].identifier + assert_equal scmid2, r2.parents[0].identifier r3 = @repository.changesets.find_by_revision('30') assert_equal 2, r3.parents.length r4 = [r3.parents[0].identifier, r3.parents[1].identifier].sort - assert_equal "3a330eb32958", r4[0] - assert_equal "a94b0528f24f", r4[1] + hex41 = "3a330eb329586ea2adb3f83237c23310e744ebe9" + scmid41 = scmid_for_assert(hex41, is_short_scmid) + hex42 = "a94b0528f24fe05ebaef496ae0500bb050772e36" + scmid42 = scmid_for_assert(hex42, is_short_scmid) + assert_equal scmid41, r4[0] + assert_equal scmid42, r4[1] end private :assert_parents @@ -453,7 +458,7 @@ class RepositoryMercurialTest < ActiveSupport::TestCase @repository.fetch_changesets @project.reload assert_equal NUM_REV, @repository.changesets.count - assert_parents + assert_parents(true) end def test_activities |