From 73b37f6bfc0a5203a37250c3aa022791f850c04c Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Mon, 21 Sep 2020 13:03:54 +0000 Subject: remove spaces inside {} of ApplicationHelperTest git-svn-id: http://svn.redmine.org/redmine/trunk@20060 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/helpers/application_helper_test.rb | 43 +++++++++++++++++---------------- 1 file changed, 22 insertions(+), 21 deletions(-) (limited to 'test/helpers') diff --git a/test/helpers/application_helper_test.rb b/test/helpers/application_helper_test.rb index 31575c4ac..3462c7fb4 100644 --- a/test/helpers/application_helper_test.rb +++ b/test/helpers/application_helper_test.rb @@ -99,7 +99,7 @@ class ApplicationHelperTest < Redmine::HelperTest # ends with a hyphen 'http://www.redmine.org/example-' => 'http://www.redmine.org/example-', } - to_test.each { |text, result| assert_equal "

#{result}

", textilizable(text) } + to_test.each {|text, result| assert_equal "

#{result}

", textilizable(text)} end def test_auto_links_with_non_ascii_characters @@ -107,7 +107,7 @@ class ApplicationHelperTest < Redmine::HelperTest "http://foo.bar/#{@russian_test}" => %|http://foo.bar/#{@russian_test}| } - to_test.each { |text, result| assert_equal "

#{result}

", textilizable(text) } + to_test.each {|text, result| assert_equal "

#{result}

", textilizable(text)} end def test_auto_mailto @@ -115,7 +115,7 @@ class ApplicationHelperTest < Redmine::HelperTest 'test@foo.bar' => 'test@foo.bar', 'test@www.foo.bar' => 'test@www.foo.bar', } - to_test.each { |text, result| assert_equal "

#{result}

", textilizable(text) } + to_test.each {|text, result| assert_equal "

#{result}

", textilizable(text)} end def test_inline_images @@ -128,7 +128,7 @@ class ApplicationHelperTest < Redmine::HelperTest 'with title !http://foo.bar/image.jpg(This is a title)!' => 'with title This is a title', 'with title !http://foo.bar/image.jpg(This is a double-quoted "title")!' => 'with title This is a double-quoted "title"', } - to_test.each { |text, result| assert_equal "

#{result}

", textilizable(text) } + to_test.each {|text, result| assert_equal "

#{result}

", textilizable(text)} end def test_inline_images_inside_tags @@ -153,7 +153,7 @@ class ApplicationHelperTest < Redmine::HelperTest '!logo.gif!:http://foo.bar/' => 'This is a logo', } attachments = Attachment.all - to_test.each { |text, result| assert_equal "

#{result}

", textilizable(text, :attachments => attachments) } + to_test.each {|text, result| assert_equal "

#{result}

", textilizable(text, :attachments => attachments)} end def test_attached_images_with_textile_and_non_ascii_filename @@ -240,7 +240,7 @@ class ApplicationHelperTest < Redmine::HelperTest } attachments = [a1, a2, a3, a4] - to_test.each { |text, result| assert_equal "

#{result}

", textilizable(text, :attachments => attachments) } + to_test.each {|text, result| assert_equal "

#{result}

", textilizable(text, :attachments => attachments)} end def test_attached_images_should_read_later @@ -264,7 +264,7 @@ class ApplicationHelperTest < Redmine::HelperTest 'Inline image: ', } attachments = [a1, a2] - to_test.each { |text, result| assert_equal "

#{result}

", textilizable(text, :attachments => attachments) } + to_test.each {|text, result| assert_equal "

#{result}

", textilizable(text, :attachments => attachments)} ensure set_tmp_attachments_directory end @@ -287,8 +287,9 @@ class ApplicationHelperTest < Redmine::HelperTest # ends with a hyphen '(see "inline link":http://www.foo.bar/Test-)' => '(see inline link)', 'http://foo.bar/page?p=1&t=z&s=-' => 'http://foo.bar/page?p=1&t=z&s=-', - 'This is an intern "link":/foo/bar-' => 'This is an intern link', } - to_test.each { |text, result| assert_equal "

#{result}

", textilizable(text) } + 'This is an intern "link":/foo/bar-' => 'This is an intern link' + } + to_test.each {|text, result| assert_equal "

#{result}

", textilizable(text)} end def test_textile_external_links_with_non_ascii_characters @@ -296,7 +297,7 @@ class ApplicationHelperTest < Redmine::HelperTest %|This is a "link":http://foo.bar/#{@russian_test}| => %|This is a link| } - to_test.each { |text, result| assert_equal "

#{result}

", textilizable(text) } + to_test.each {|text, result| assert_equal "

#{result}

", textilizable(text)} end def test_redmine_links @@ -466,7 +467,7 @@ class ApplicationHelperTest < Redmine::HelperTest 'user:foobar' => 'user:foobar', } @project = Project.find(1) - to_test.each { |text, result| assert_equal "

#{result}

", textilizable(text), "#{text} failed" } + to_test.each {|text, result| assert_equal "

#{result}

", textilizable(text), "#{text} failed"} end def test_link_to_note_within_the_same_page @@ -544,7 +545,7 @@ class ApplicationHelperTest < Redmine::HelperTest 'source:/some/file' ] @project = Project.find(1) - to_test.each { |text| assert_equal "

#{text}

", textilizable("!" + text), "#{text} failed" } + to_test.each {|text| assert_equal "

#{text}

", textilizable("!" + text), "#{text} failed"} end def test_cross_project_redmine_links @@ -672,7 +673,7 @@ class ApplicationHelperTest < Redmine::HelperTest } @project = Project.find(1) - to_test.each { |text, result| assert_equal "

#{result}

", textilizable(text), "#{text} failed" } + to_test.each {|text, result| assert_equal "

#{result}

", textilizable(text), "#{text} failed"} end def test_cross_project_multiple_repositories_redmine_links @@ -720,7 +721,7 @@ class ApplicationHelperTest < Redmine::HelperTest 'invalid:source:invalid|some/file' => 'invalid:source:invalid|some/file', } @project = Project.find(3) - to_test.each { |text, result| assert_equal "

#{result}

", textilizable(text), "#{text} failed" } + to_test.each {|text, result| assert_equal "

#{result}

", textilizable(text), "#{text} failed"} end def test_redmine_links_git_commit @@ -744,7 +745,7 @@ class ApplicationHelperTest < Redmine::HelperTest to_test = { 'commit:abcd' => changeset_link, } - to_test.each { |text, result| assert_equal "

#{result}

", textilizable(text) } + to_test.each {|text, result| assert_equal "

#{result}

", textilizable(text)} end # TODO: Bazaar commit id contains mail address, so it contains '@' and '_'. @@ -781,7 +782,7 @@ class ApplicationHelperTest < Redmine::HelperTest 'r123' => changeset_link_rev, 'commit:abcd' => changeset_link_commit, } - to_test.each { |text, result| assert_equal "

#{result}

", textilizable(text) } + to_test.each {|text, result| assert_equal "

#{result}

", textilizable(text)} end def test_attachment_links @@ -916,7 +917,7 @@ class ApplicationHelperTest < Redmine::HelperTest '[[private-child:Wiki]]' => '[[private-child:Wiki]]', } @project = Project.find(1) - to_test.each { |text, result| assert_equal "

#{result}

", textilizable(text) } + to_test.each {|text, result| assert_equal "

#{result}

", textilizable(text)} end def test_wiki_links_with_special_characters_should_work_in_textile @@ -924,7 +925,7 @@ class ApplicationHelperTest < Redmine::HelperTest @project = Project.find(1) with_settings :text_formatting => 'textile' do - to_test.each { |text, result| assert_equal "

#{result}

", textilizable(text) } + to_test.each {|text, result| assert_equal "

#{result}

", textilizable(text)} end end @@ -933,7 +934,7 @@ class ApplicationHelperTest < Redmine::HelperTest @project = Project.find(1) with_settings :text_formatting => 'markdown' do - to_test.each { |text, result| assert_equal "

#{result}

", textilizable(text).strip } + to_test.each {|text, result| assert_equal "

#{result}

", textilizable(text).strip} end end @@ -972,10 +973,10 @@ class ApplicationHelperTest < Redmine::HelperTest } @project = Project.find(2) # OnlineStore with_settings :text_formatting => 'textile' do - to_test.each { |text, result| assert_equal "

#{result}

", textilizable(text) } + to_test.each {|text, result| assert_equal "

#{result}

", textilizable(text)} end with_settings :text_formatting => 'markdown' do - to_test.each { |text, result| assert_equal "

#{result}

", textilizable(text).strip } + to_test.each {|text, result| assert_equal "

#{result}

", textilizable(text).strip} end end -- cgit v1.2.3