From 7afb0995c2ecfb0022a0b385b7afbca39e6893ec Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sat, 12 Dec 2020 15:49:14 +0000 Subject: [PATCH] shorten long line of ApplicationHelperTest git-svn-id: http://svn.redmine.org/redmine/trunk@20636 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/helpers/application_helper_test.rb | 44 +++++++++++++++++-------- 1 file changed, 30 insertions(+), 14 deletions(-) diff --git a/test/helpers/application_helper_test.rb b/test/helpers/application_helper_test.rb index 24761e126..28d47ce5e 100644 --- a/test/helpers/application_helper_test.rb +++ b/test/helpers/application_helper_test.rb @@ -86,8 +86,10 @@ class ApplicationHelperTest < Redmine::HelperTest '(see inline link : http://www.foo.bar/Test).', '(see "inline link":http://www.foo.bar/Test_(foobar))' => '(see inline link)', - '(see "inline link":http://www.foo.bar/Test)' => '(see inline link)', - '(see "inline link":http://www.foo.bar/Test).' => '(see inline link).', + '(see "inline link":http://www.foo.bar/Test)' => + '(see inline link)', + '(see "inline link":http://www.foo.bar/Test).' => + '(see inline link).', 'www.foo.bar' => 'www.foo.bar', 'http://foo.bar/page?p=1&t=z&s=' => 'http://foo.bar/page?p=1&t=z&s=', @@ -482,20 +484,25 @@ class ApplicationHelperTest < Redmine::HelperTest 'source:/some/file@branch' => link_to('source:/some/file@branch', source_url_with_branch, :class => 'source'), 'source:/some/file.ext@52' => link_to('source:/some/file.ext@52', source_url_with_rev_and_ext, :class => 'source'), 'source:/some/file#L110' => link_to('source:/some/file#L110', source_url + "#L110", :class => 'source'), - 'source:/some/file.ext#L110' => link_to('source:/some/file.ext#L110', source_url_with_ext + "#L110", :class => 'source'), - 'source:/some/file@52#L110' => link_to('source:/some/file@52#L110', source_url_with_rev + "#L110", :class => 'source'), + 'source:/some/file.ext#L110' => + link_to('source:/some/file.ext#L110', source_url_with_ext + "#L110", :class => 'source'), + 'source:/some/file@52#L110' => + link_to('source:/some/file@52#L110', source_url_with_rev + "#L110", :class => 'source'), # export 'export:/some/file' => link_to('export:/some/file', export_url, :class => 'source download'), 'export:/some/file.ext' => link_to('export:/some/file.ext', export_url_with_ext, :class => 'source download'), 'export:/some/file@52' => link_to('export:/some/file@52', export_url_with_rev, :class => 'source download'), - 'export:/some/file.ext@52' => link_to('export:/some/file.ext@52', export_url_with_rev_and_ext, :class => 'source download'), - 'export:/some/file@branch' => link_to('export:/some/file@branch', export_url_with_branch, :class => 'source download'), + 'export:/some/file.ext@52' => + link_to('export:/some/file.ext@52', export_url_with_rev_and_ext, :class => 'source download'), + 'export:/some/file@branch' => + link_to('export:/some/file@branch', export_url_with_branch, :class => 'source download'), # forum 'forum#2' => link_to('Discussion', board_url, :class => 'board'), 'forum:Discussion' => link_to('Discussion', board_url, :class => 'board'), # message 'message#4' => link_to('Post 2', message_url, :class => 'message'), - 'message#5' => link_to('RE: post 2', message_url.merge(:anchor => 'message-5', :r => 5), :class => 'message'), + 'message#5' => + link_to('RE: post 2', message_url.merge(:anchor => 'message-5', :r => 5), :class => 'message'), # news 'news#1' => link_to('eCookbook first release !', news_url, :class => 'news'), 'news:"eCookbook first release !"' => link_to('eCookbook first release !', news_url, :class => 'news'), @@ -1380,8 +1387,9 @@ class ApplicationHelperTest < Redmine::HelperTest def test_headings raw = 'h1. Some heading' - expected = %|\n

Some heading

| - + expected = + %|\n

Some heading| + + %|

| assert_equal expected, textilizable(raw) end @@ -1390,15 +1398,18 @@ class ApplicationHelperTest < Redmine::HelperTest # ones even if the heading text contains unconventional characters raw = 'h1. Some heading related to version 0.5' anchor = sanitize_anchor_name("Some-heading-related-to-version-0.5") - expected = %|\n

Some heading related to version 0.5

| - + expected = + %|\n

Some heading related to version 0.5| + + %|

| assert_equal expected, textilizable(raw) end def test_headings_in_wiki_single_page_export_should_be_prepended_with_page_title page = WikiPage.new(:title => 'Page Title', :wiki_id => 1) content = WikiContent.new(:text => 'h1. Some heading', :page => page) - expected = %|\n

Some heading

| + expected = + %|\n

Some heading| + + %|

| assert_equal expected, textilizable(content, :text, :wiki_links => :anchor) end @@ -1580,7 +1591,8 @@ class ApplicationHelperTest < Redmine::HelperTest 'Edit this section' \ '' \ '' \ - '

Subtitle after pre tag

' + '

Subtitle after pre tag' \ + '

' ), result ) @@ -1589,7 +1601,11 @@ class ApplicationHelperTest < Redmine::HelperTest def test_default_formatter with_settings :text_formatting => 'unknown' do text = 'a *link*: http://www.example.net/' - assert_equal '

a *link*: http://www.example.net/

', textilizable(text) + assert_equal( + '

a *link*: ' \ + 'http://www.example.net/

', + textilizable(text) + ) end end -- 2.39.5