From 5df064ed85711ceecdcfbdd66402672cca2b0d58 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 12 Jan 2014 09:19:47 +0000 Subject: Fixed Changeset#text_tag for changeset with hash and repository identifier (#13544). git-svn-id: http://svn.redmine.org/redmine/trunk@12660 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/changeset_test.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test/unit/changeset_test.rb') diff --git a/test/unit/changeset_test.rb b/test/unit/changeset_test.rb index d1ac607b4..9eb46594c 100644 --- a/test/unit/changeset_test.rb +++ b/test/unit/changeset_test.rb @@ -343,6 +343,16 @@ class ChangesetTest < ActiveSupport::TestCase assert_equal 'commit:0123456789', c.text_tag end + def test_text_tag_hash_with_repository_identifier + r = Repository::Subversion.new( + :project_id => 1, + :url => 'svn://localhost/test', + :identifier => 'documents') + c = Changeset.new(:revision => '7234cb27', :scmid => '7234cb27', :repository => r) + assert_equal 'commit:documents|7234cb27', c.text_tag + assert_equal 'ecookbook:commit:documents|7234cb27', c.text_tag(Project.find(2)) + end + def test_previous changeset = Changeset.find_by_revision('3') assert_equal Changeset.find_by_revision('2'), changeset.previous -- cgit v1.2.3