From 58d906446d0cbbbcdd913ce76561d3eae7bb5958 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sun, 2 Feb 2014 12:20:16 +0000 Subject: [PATCH] scm: mercurial: use scmid_for_assert in assert_entries (#14361) git-svn-id: http://svn.redmine.org/redmine/trunk@12774 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/repository_mercurial_test.rb | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/test/unit/repository_mercurial_test.rb b/test/unit/repository_mercurial_test.rb index d5e7b1bb5..a2ed8728c 100644 --- a/test/unit/repository_mercurial_test.rb +++ b/test/unit/repository_mercurial_test.rb @@ -85,17 +85,19 @@ class RepositoryMercurialTest < ActiveSupport::TestCase assert_kind_of Redmine::Scm::Adapters::Entries, entries end - def assert_entries + def assert_entries(is_short_scmid=true) + hex = "9d5b5b00419901478496242e0768deba1ce8c51e" + scmid = scmid_for_assert(hex, is_short_scmid) [2, '400bb8672109', '400', 400].each do |r| entries1 = @repository.entries(nil, r) assert entries1 assert_kind_of Redmine::Scm::Adapters::Entries, entries1 assert_equal 3, entries1.size readme = entries1[2] - assert_equal '1', readme.lastrev.revision - assert_equal '9d5b5b004199', readme.lastrev.identifier - assert_equal '1', readme.changeset.revision - assert_equal '9d5b5b004199', readme.changeset.scmid + assert_equal '1', readme.lastrev.revision + assert_equal scmid, readme.lastrev.identifier + assert_equal '1', readme.changeset.revision + assert_equal scmid, readme.changeset.scmid end end private :assert_entries @@ -105,7 +107,7 @@ class RepositoryMercurialTest < ActiveSupport::TestCase @repository.fetch_changesets @project.reload assert_equal NUM_REV, @repository.changesets.count - assert_entries + assert_entries(true) end def test_entry_on_tip