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