From c4a9d4cd4df130fa84e5c1948fc93d1f2b0bba5a Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 20 Jun 2019 14:01:50 +0000 Subject: Issue macro for flexible linking to issues (#29489). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch by Jens Krämer. git-svn-id: http://svn.redmine.org/redmine/trunk@18297 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/lib/redmine/wiki_formatting/macros_test.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test/unit') diff --git a/test/unit/lib/redmine/wiki_formatting/macros_test.rb b/test/unit/lib/redmine/wiki_formatting/macros_test.rb index b91638274..95b886e85 100644 --- a/test/unit/lib/redmine/wiki_formatting/macros_test.rb +++ b/test/unit/lib/redmine/wiki_formatting/macros_test.rb @@ -408,4 +408,14 @@ EXPECTED text = "*{{hello_world}}*" assert_match %r|\A

Hello world!.*

\z|, textilizable(text) end + + def test_issue_macro_should_not_render_link_if_not_visible + assert_equal "

#123

", textilizable('{{issue(123)}}') + end + + def test_issue_macro_should_render_link_to_issue + issue = Issue.find 1 + assert_equal %{

Bug #1: #{issue.subject}

}, textilizable("{{issue(1)}}") + assert_equal %{

eCookbook - Bug #1: #{issue.subject}

}, textilizable("{{issue(1, project=true)}}") + end end -- cgit v1.2.3