summaryrefslogtreecommitdiffstats
path: root/test/unit/helpers
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2010-03-14 08:33:53 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2010-03-14 08:33:53 +0000
commit2f5c17a0f6eac2f50e61053e06672a1e83d4f598 (patch)
treed2be24de5e56327265ced2b87ff37439185d0f87 /test/unit/helpers
parentc3e8d1d5124635a7ca49eec195a855d5d14dab77 (diff)
downloadredmine-2f5c17a0f6eac2f50e61053e06672a1e83d4f598.tar.gz
redmine-2f5c17a0f6eac2f50e61053e06672a1e83d4f598.zip
Optimization: load attachments when needed.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3581 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/helpers')
-rw-r--r--test/unit/helpers/application_helper_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/unit/helpers/application_helper_test.rb b/test/unit/helpers/application_helper_test.rb
index f5b0fb7d3..fafd9c04e 100644
--- a/test/unit/helpers/application_helper_test.rb
+++ b/test/unit/helpers/application_helper_test.rb
@@ -211,6 +211,14 @@ RAW
to_test.each { |text, result| assert_equal "<p>#{result}</p>", textilizable(text), "#{text} failed" }
end
+ def test_attachment_links
+ attachment_link = link_to('error281.txt', {:controller => 'attachments', :action => 'download', :id => '1'}, :class => 'attachment')
+ to_test = {
+ 'attachment:error281.txt' => attachment_link
+ }
+ to_test.each { |text, result| assert_equal "<p>#{result}</p>", textilizable(text, :attachments => Issue.find(3).attachments), "#{text} failed" }
+ end
+
def test_wiki_links
to_test = {
'[[CookBook documentation]]' => '<a href="/projects/ecookbook/wiki/CookBook_documentation" class="wiki-page">CookBook documentation</a>',