summaryrefslogtreecommitdiffstats
path: root/test/unit/helpers
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2014-11-14 21:31:27 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2014-11-14 21:31:27 +0000
commiteac3b2b27def63a68ea0de78f9bedba95da6121c (patch)
treecb83c30f8e6f109ff38e44a1f187f6f44c07bd86 /test/unit/helpers
parent46756cbd5646286a96df9058373324454add49a4 (diff)
downloadredmine-eac3b2b27def63a68ea0de78f9bedba95da6121c.tar.gz
redmine-eac3b2b27def63a68ea0de78f9bedba95da6121c.zip
Fixed that Redmine links should not be parsed inside links (#18301).
git-svn-id: http://svn.redmine.org/redmine/trunk@13596 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/helpers')
-rw-r--r--test/unit/helpers/application_helper_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/unit/helpers/application_helper_test.rb b/test/unit/helpers/application_helper_test.rb
index 6ce52ed72..369057890 100644
--- a/test/unit/helpers/application_helper_test.rb
+++ b/test/unit/helpers/application_helper_test.rb
@@ -363,6 +363,12 @@ RAW
to_test.each { |text, result| assert_equal "<p>#{result}</p>", textilizable(text), "#{text} failed" }
end
+ def test_should_not_parse_redmine_links_inside_link
+ raw = "r1 should not be parsed in http://example.com/url-r1/"
+ assert_match %r{<p><a class="changeset".*>r1</a> should not be parsed in <a class="external" href="http://example.com/url-r1/">http://example.com/url-r1/</a></p>},
+ textilizable(raw, :project => Project.find(1))
+ end
+
def test_redmine_links_with_a_different_project_before_current_project
vp1 = Version.generate!(:project_id => 1, :name => '1.4.4')
vp3 = Version.generate!(:project_id => 3, :name => '1.4.4')