]> source.dussan.org Git - redmine.git/commitdiff
Rails4: replace hard-coded html with class at ApplicationHelperTest#test_attachment_l...
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 5 Feb 2014 04:14:43 +0000 (04:14 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 5 Feb 2014 04:14:43 +0000 (04:14 +0000)
See r12784 comment.

git-svn-id: http://svn.redmine.org/redmine/trunk@12812 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/helpers/application_helper_test.rb

index 4df9087f2784d816596fff9d105d291a172251f9..e4c2e6a36d675c7505e9f985744d41c034c7476e 100644 (file)
@@ -590,9 +590,10 @@ RAW
     set_tmp_attachments_directory
     a1 = Attachment.generate!(:filename => "test.txt", :created_on => 1.hour.ago)
     a2 = Attachment.generate!(:filename => "test.txt")
-
-    assert_equal %(<p><a href="/attachments/download/#{a2.id}/test.txt" class="attachment">test.txt</a></p>),
-      textilizable('attachment:test.txt', :attachments => [a1, a2])
+    result = link_to("test.txt", "/attachments/download/#{a2.id}/test.txt",
+                     :class => "attachment")
+    assert_equal "<p>#{result}</p>",
+                 textilizable('attachment:test.txt', :attachments => [a1, a2])
   end
 
   def test_wiki_links