diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-12-11 14:20:04 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-12-11 14:20:04 +0000 |
commit | 8407db985475efb8e5892b8fa325be01e125ff3f (patch) | |
tree | 7342130c2ca305e6c2aec9f6682c70b421741c18 /test | |
parent | 00d50157d3d6ee8a12cf41d74c0a4e0da7fc9c35 (diff) | |
download | redmine-8407db985475efb8e5892b8fa325be01e125ff3f.tar.gz redmine-8407db985475efb8e5892b8fa325be01e125ff3f.zip |
Fixes Changeset#text_tag for numeric scmid (#6681).
Contributed by Toshi MARUYAMA.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4490 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/changeset_test.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/test/unit/changeset_test.rb b/test/unit/changeset_test.rb index 612a4299b..47f5d5fc4 100644 --- a/test/unit/changeset_test.rb +++ b/test/unit/changeset_test.rb @@ -75,7 +75,6 @@ class ChangesetTest < ActiveSupport::TestCase c = Changeset.new(:repository => Project.find(1).repository, :committed_on => 24.hours.ago, :comments => 'Worked on this issue #1 @2h', - :scmid => '520', :revision => '520', :user => User.find(2)) assert_difference 'TimeEntry.count' do @@ -171,8 +170,8 @@ class ChangesetTest < ActiveSupport::TestCase assert c.issues.first.project != c.project end - def test_text_tag_numeric - c = Changeset.new(:scmid => '520', :revision => '520') + def test_text_tag_revision + c = Changeset.new(:revision => '520') assert_equal 'r520', c.text_tag end @@ -181,6 +180,11 @@ class ChangesetTest < ActiveSupport::TestCase assert_equal 'commit:7234cb2750b63f47bff735edc50a1c0a433c2518', c.text_tag end + def test_text_tag_hash_all_number + c = Changeset.new(:scmid => '0123456789', :revision => '0123456789') + assert_equal 'commit:0123456789', c.text_tag + end + def test_previous changeset = Changeset.find_by_revision('3') assert_equal Changeset.find_by_revision('2'), changeset.previous |