From 93e0885b64d82b42e028f68ad6f8e15dede7c781 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Tue, 15 Jan 2013 21:08:27 +0000 Subject: Link to attachment should return latest attachment (#7510). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11196 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/helpers/application_helper_test.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test/unit') diff --git a/test/unit/helpers/application_helper_test.rb b/test/unit/helpers/application_helper_test.rb index 2654a1017..f23417d1a 100644 --- a/test/unit/helpers/application_helper_test.rb +++ b/test/unit/helpers/application_helper_test.rb @@ -555,6 +555,15 @@ RAW to_test.each { |text, result| assert_equal "

#{result}

", textilizable(text, :attachments => Issue.find(3).attachments), "#{text} failed" } end + def test_attachment_link_should_link_to_latest_attachment + set_tmp_attachments_directory + a1 = Attachment.generate!(:filename => "test.txt", :created_on => 1.hour.ago) + a2 = Attachment.generate!(:filename => "test.txt") + + assert_equal %(

test.txt

), + textilizable('attachment:test.txt', :attachments => [a1, a2]) + end + def test_wiki_links to_test = { '[[CookBook documentation]]' => 'CookBook documentation', -- cgit v1.2.3