]> source.dussan.org Git - redmine.git/commitdiff
scm: mercurial: use scmid_for_assert in assert_entry (#14361)
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 2 Feb 2014 12:19:59 +0000 (12:19 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 2 Feb 2014 12:19:59 +0000 (12:19 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@12773 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/repository_mercurial_test.rb

index 7d8e8172f0f823bd4ae6d3a7f695735343885090..d5e7b1bb5a2ae990f95227ab07cc00d4b46931b6 100644 (file)
@@ -115,7 +115,9 @@ class RepositoryMercurialTest < ActiveSupport::TestCase
       assert_equal 'dir', entry.kind
     end
 
-    def assert_entry
+    def assert_entry(is_short_scmid=true)
+      hex = "0885933ad4f68d77c2649cd11f8311276e7ef7ce"
+      scmid = scmid_for_assert(hex, is_short_scmid)
       ["README", "/README"].each do |path|
         ["0", "0885933ad4f6", "0885933ad4f68d77c2649cd11f8311276e7ef7ce"].each do |rev|
           entry = @repository.entry(path, rev)
@@ -123,7 +125,7 @@ class RepositoryMercurialTest < ActiveSupport::TestCase
           assert_equal "README", entry.path
           assert_equal "file", entry.kind
           assert_equal '0', entry.lastrev.revision
-          assert_equal '0885933ad4f6', entry.lastrev.identifier
+          assert_equal scmid, entry.lastrev.identifier
         end
       end
       ["sources", "/sources", "/sources/"].each do |path|
@@ -141,14 +143,14 @@ class RepositoryMercurialTest < ActiveSupport::TestCase
           assert_equal "sources/watchers_controller.rb", entry.path
           assert_equal "file", entry.kind
           assert_equal '0', entry.lastrev.revision
-          assert_equal '0885933ad4f6', entry.lastrev.identifier
+          assert_equal scmid, entry.lastrev.identifier
         end
       end
     end
     private :assert_entry
 
     def test_entry_short_id
-      assert_entry
+      assert_entry(true)
     end
 
     def test_fetch_changesets_from_scratch