diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-02-01 04:23:53 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-02-01 04:23:53 +0000 |
commit | 5dcecec1bd8ac41d3e32b72f814b38e7040a7de1 (patch) | |
tree | 11472823abdc51dba41a51ecb7472a70416fb5f1 /test/unit/repository_mercurial_test.rb | |
parent | fdc0731cb56e9b093a4b268533e5da77a54e620a (diff) | |
download | redmine-5dcecec1bd8ac41d3e32b72f814b38e7040a7de1.tar.gz redmine-5dcecec1bd8ac41d3e32b72f814b38e7040a7de1.zip |
scm: mercurial: use 12 chars id for format_changeset_identifier (#14361)
git-svn-id: http://svn.redmine.org/redmine/trunk@12749 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/repository_mercurial_test.rb')
-rw-r--r-- | test/unit/repository_mercurial_test.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/unit/repository_mercurial_test.rb b/test/unit/repository_mercurial_test.rb index da0b6ec77..a9c5da7eb 100644 --- a/test/unit/repository_mercurial_test.rb +++ b/test/unit/repository_mercurial_test.rb @@ -297,6 +297,17 @@ class RepositoryMercurialTest < ActiveSupport::TestCase assert_equal '2:400bb8672109', c.format_identifier end + def test_format_identifier_long_id + assert_equal 0, @repository.changesets.count + Changeset.create!(:repository => @repository, + :committed_on => Time.now, + :revision => '0', + :scmid => '0885933ad4f68d77c2649cd11f8311276e7ef7ce', + :comments => 'test') + c = @repository.changesets.find_by_revision('0') + assert_equal '0:0885933ad4f6', c.format_identifier + end + def test_find_changeset_by_empty_name assert_equal 0, @repository.changesets.count @repository.fetch_changesets |