From 2fc8ede0933baac0e42b42c067bddfe40ae9bec4 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Thu, 13 Feb 2014 05:40:09 +0000 Subject: [PATCH] Rails4: replace hard-coded html with class at Redmine::WikiFormatting::MacrosTest See r12784 comment. git-svn-id: http://svn.redmine.org/redmine/trunk@12876 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- .../redmine/wiki_formatting/macros_test.rb | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/test/unit/lib/redmine/wiki_formatting/macros_test.rb b/test/unit/lib/redmine/wiki_formatting/macros_test.rb index d2dffb41c..772fa9555 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 -- 2.39.5