From 65425463f1e1d2eda3846fb541e3ac9c86126de0 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Mon, 30 Nov 2020 15:49:14 +0000 Subject: shorten long line of test/unit/lib/redmine/wiki_formatting/macros_test.rb git-svn-id: http://svn.redmine.org/redmine/trunk@20527 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- .../lib/redmine/wiki_formatting/macros_test.rb | 66 ++++++++++++++-------- 1 file changed, 43 insertions(+), 23 deletions(-) (limited to 'test') diff --git a/test/unit/lib/redmine/wiki_formatting/macros_test.rb b/test/unit/lib/redmine/wiki_formatting/macros_test.rb index 27d2f7133..2cfa3e7a7 100644 --- a/test/unit/lib/redmine/wiki_formatting/macros_test.rb +++ b/test/unit/lib/redmine/wiki_formatting/macros_test.rb @@ -252,19 +252,20 @@ class Redmine::WikiFormatting::MacrosTest < Redmine::HelperTest h2. Heading }}" RAW - - expected_toc = '' - + expected_toc = + '' assert_include expected_toc, textilizable(text).gsub(/[\r\n]/, '') end def test_macro_child_pages - expected = "

\n

" - + expected = + "

\n

" @project = Project.find(1) # child pages of the current wiki page assert_equal expected, textilizable("{{child_pages}}", :object => WikiPage.find(2).content) @@ -276,22 +277,29 @@ class Redmine::WikiFormatting::MacrosTest < Redmine::HelperTest end def test_macro_child_pages_with_parent_option - expected = "

\n

" + expected = + "

\n

" @project = Project.find(1) # child pages of the current wiki page assert_equal expected, textilizable("{{child_pages(parent=1)}}", :object => WikiPage.find(2).content) # child pages of another page - assert_equal expected, textilizable("{{child_pages(Another_page, parent=1)}}", :object => WikiPage.find(1).content) - + assert_equal( + expected, + textilizable("{{child_pages(Another_page, parent=1)}}", :object => WikiPage.find(1).content) + ) @project = Project.find(2) - assert_equal expected, textilizable("{{child_pages(ecookbook:Another_page, parent=1)}}", :object => WikiPage.find(1).content) + assert_equal( + expected, + textilizable("{{child_pages(ecookbook:Another_page, parent=1)}}", :object => WikiPage.find(1).content) + ) end def test_macro_child_pages_with_depth_option @@ -380,7 +388,10 @@ class Redmine::WikiFormatting::MacrosTest < Redmine::HelperTest def test_macros_should_not_mangle_next_macros_outputs text = '{{macro(2)}} !{{macro(2)}} {{hello_world(foo)}}' - assert_equal '

{{macro(2)}} {{macro(2)}} Hello world! Object: NilClass, Arguments: foo and no block of text.

', textilizable(text) + assert_equal( + '

{{macro(2)}} {{macro(2)}} Hello world! Object: NilClass, Arguments: foo and no block of text.

', + textilizable(text) + ) end def test_macros_with_text_should_not_mangle_following_macros @@ -410,8 +421,17 @@ class Redmine::WikiFormatting::MacrosTest < Redmine::HelperTest 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)}}") + 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