From 47353387c1af7cdd4676f9a8419b4b1325e5bc7b Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Wed, 5 Feb 2014 04:14:58 +0000 Subject: [PATCH] Rails4: replace hard-coded html with class at ApplicationHelperTest#test_attachment_links See r12784 comment. git-svn-id: http://svn.redmine.org/redmine/trunk@12813 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/helpers/application_helper_test.rb | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/test/unit/helpers/application_helper_test.rb b/test/unit/helpers/application_helper_test.rb index e4c2e6a36..09cd91623 100644 --- a/test/unit/helpers/application_helper_test.rb +++ b/test/unit/helpers/application_helper_test.rb @@ -580,10 +580,13 @@ RAW end def test_attachment_links - to_test = { - 'attachment:error281.txt' => 'error281.txt' - } - to_test.each { |text, result| assert_equal "

#{result}

", textilizable(text, :attachments => Issue.find(3).attachments), "#{text} failed" } + text = 'attachment:error281.txt' + result = link_to("error281.txt", "/attachments/download/1/error281.txt", + :class => "attachment") + assert_equal "

#{result}

", + textilizable(text, + :attachments => Issue.find(3).attachments), + "#{text} failed" end def test_attachment_link_should_link_to_latest_attachment