end
def test_attachment_links
- to_test = {
- 'attachment:error281.txt' => '<a href="/attachments/download/1/error281.txt" class="attachment">error281.txt</a>'
- }
- to_test.each { |text, result| assert_equal "<p>#{result}</p>", 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 "<p>#{result}</p>",
+ textilizable(text,
+ :attachments => Issue.find(3).attachments),
+ "#{text} failed"
end
def test_attachment_link_should_link_to_latest_attachment