From 2f43fca8f084a3503b999f1f0f4970a68c2c0579 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Wed, 5 Feb 2014 04:14:27 +0000 Subject: [PATCH] Rails4: replace hard-coded html with class at ApplicationHelperTest#test_wiki_links_in_tables See r12784 comment. git-svn-id: http://svn.redmine.org/redmine/trunk@12811 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/helpers/application_helper_test.rb | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/test/unit/helpers/application_helper_test.rb b/test/unit/helpers/application_helper_test.rb index 1cb72c435..4df9087f2 100644 --- a/test/unit/helpers/application_helper_test.rb +++ b/test/unit/helpers/application_helper_test.rb @@ -833,13 +833,15 @@ EXPECTED end def test_wiki_links_in_tables - to_test = {"|[[Page|Link title]]|[[Other Page|Other title]]|\n|Cell 21|[[Last page]]|" => - 'Link title' + - 'Other title' + - 'Cell 21Last page' - } + text = "|[[Page|Link title]]|[[Other Page|Other title]]|\n|Cell 21|[[Last page]]|" + link1 = link_to("Link title", "/projects/ecookbook/wiki/Page", :class => "wiki-page new") + link2 = link_to("Other title", "/projects/ecookbook/wiki/Other_Page", :class => "wiki-page new") + link3 = link_to("Last page", "/projects/ecookbook/wiki/Last_page", :class => "wiki-page new") + result = "#{link1}" + + "#{link2}" + + "Cell 21#{link3}" @project = Project.find(1) - to_test.each { |text, result| assert_equal "#{result}
", textilizable(text).gsub(/[\t\n]/, '') } + assert_equal "#{result}
", textilizable(text).gsub(/[\t\n]/, '') end def test_text_formatting -- 2.39.5