diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-02-02 12:19:59 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-02-02 12:19:59 +0000 |
commit | 642f13605ecbdb96074bd425b6150ca24b11114e (patch) | |
tree | 9153bd80954cc0f372a4028a945ea5858cd9d435 /test | |
parent | 1cda73c1b4aaf2684e4469c19cb0c2139943288e (diff) | |
download | redmine-642f13605ecbdb96074bd425b6150ca24b11114e.tar.gz redmine-642f13605ecbdb96074bd425b6150ca24b11114e.zip |
scm: mercurial: use scmid_for_assert in assert_entry (#14361)
git-svn-id: http://svn.redmine.org/redmine/trunk@12773 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/repository_mercurial_test.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/test/unit/repository_mercurial_test.rb b/test/unit/repository_mercurial_test.rb index 7d8e8172f..d5e7b1bb5 100644 --- a/test/unit/repository_mercurial_test.rb +++ b/test/unit/repository_mercurial_test.rb @@ -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 |