diff --git a/test/unit/lib/redmine/wiki_formatting/macros_test.rb b/test/unit/lib/redmine/wiki_formatting/macros_test.rb index d2dffb4..772fa95 100644 --- a/test/unit/lib/redmine/wiki_formatting/macros_test.rb +++ b/test/unit/lib/redmine/wiki_formatting/macros_test.rb @@ -286,18 +286,30 @@ class Redmine::WikiFormatting::MacrosTest < ActionView::TestCase end def test_macro_thumbnail - assert_equal '

testfile.PNG

', - textilizable("{{thumbnail(testfile.png)}}", :object => Issue.find(14)) + link = link_to('testfile.PNG'.html_safe, + "/attachments/17", + :class => "thumbnail", + :title => "testfile.PNG") + assert_equal "

#{link}

", + textilizable("{{thumbnail(testfile.png)}}", :object => Issue.find(14)) end def test_macro_thumbnail_with_size - assert_equal '

testfile.PNG

', - textilizable("{{thumbnail(testfile.png, size=200)}}", :object => Issue.find(14)) + link = link_to('testfile.PNG'.html_safe, + "/attachments/17", + :class => "thumbnail", + :title => "testfile.PNG") + assert_equal "

#{link}

", + textilizable("{{thumbnail(testfile.png, size=200)}}", :object => Issue.find(14)) end def test_macro_thumbnail_with_title - assert_equal '

testfile.PNG

', - textilizable("{{thumbnail(testfile.png, title=Cool image)}}", :object => Issue.find(14)) + link = link_to('testfile.PNG'.html_safe, + "/attachments/17", + :class => "thumbnail", + :title => "Cool image") + assert_equal "

#{link}

", + textilizable("{{thumbnail(testfile.png, title=Cool image)}}", :object => Issue.find(14)) end def test_macro_thumbnail_with_invalid_filename_should_fail