diff --git a/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb b/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb index 66e588ff..e34c273b 100644 --- a/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb +++ b/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb @@ -33,7 +33,7 @@ class Redmine::WikiFormatting::TextileFormatterTest < HelperTestCase } def test_modifiers - to_test = { + assert_html_output( '*bold*' => 'bold', 'before *bold*' => 'before bold', '*bold* after' => 'bold after', @@ -43,11 +43,8 @@ class Redmine::WikiFormatting::TextileFormatterTest < HelperTestCase '*two* *words*' => 'two words', '*(two)* *(words)*' => '(two) (words)', # with class - '*(foo)two words*' => 'two words', - } - to_test.each do |text, expected| - assert_equal "
#{expected}
", @formatter.new(text).to_html - end + '*(foo)two words*' => 'two words' + ) end def test_modifiers_combination @@ -56,25 +53,27 @@ class Redmine::WikiFormatting::TextileFormatterTest < HelperTestCase next if m1 == m2 text = "#{m2}#{m1}Phrase modifiers#{m1}#{m2}" html = "<#{tag2}><#{tag1}>Phrase modifiers#{tag1}>#{tag2}>
" - assert_equal html, @formatter.new(text).to_html + assert_html_output text => html end end end def test_inline_code - to_test = { + assert_html_output( 'this is @some code@' => 'this issome code
',
- '@<Location /redmine>
',
- }
- to_test.each do |text, expected|
- assert_equal "#{expected}
", @formatter.new(text).to_html - end + '@<Location /redmine>
'
+ )
end
def test_escaping
- to_test = {
- 'this is a