diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-03-15 19:54:50 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-03-15 19:54:50 +0000 |
commit | 7203196212ae78d3723c0df4c661a3c03769135a (patch) | |
tree | 60e4f6cd1e1a04ee7bc13dca6c96d66ff14ea98b /test/unit/helpers | |
parent | a179f261cde4a150e4fe5a9089f6a204244bdc04 (diff) | |
download | redmine-7203196212ae78d3723c0df4c661a3c03769135a.tar.gz redmine-7203196212ae78d3723c0df4c661a3c03769135a.zip |
Do not parse redmine links inside pre/code tags (#1288).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3589 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/helpers')
-rw-r--r-- | test/unit/helpers/application_helper_test.rb | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/unit/helpers/application_helper_test.rb b/test/unit/helpers/application_helper_test.rb index 3be0d7dbd..011df82fe 100644 --- a/test/unit/helpers/application_helper_test.rb +++ b/test/unit/helpers/application_helper_test.rb @@ -297,6 +297,33 @@ EXPECTED assert_equal expected.gsub(%r{[\r\n\t]}, ''), textilizable(raw).gsub(%r{[\r\n\t]}, '') end + def test_pre_content_should_not_parse_wiki_and_redmine_links + raw = <<-RAW +[[CookBook documentation]] + +#1 + +<pre> +[[CookBook documentation]] + +#1 +</pre> +RAW + + expected = <<-EXPECTED +<p><a href="/projects/ecookbook/wiki/CookBook_documentation" class="wiki-page">CookBook documentation</a></p> +<p><a href="/issues/1" class="issue status-1 priority-1" title="Can't print recipes (New)">#1</a></p> +<pre> +[[CookBook documentation]] + +#1 +</pre> +EXPECTED + + @project = Project.find(1) + assert_equal expected.gsub(%r{[\r\n\t]}, ''), textilizable(raw).gsub(%r{[\r\n\t]}, '') + end + def test_syntax_highlight raw = <<-RAW <pre><code class="ruby"> |