diff --git a/test/helpers/application_helper_test.rb b/test/helpers/application_helper_test.rb index 17d4a14c2..81b3f7859 100644 --- a/test/helpers/application_helper_test.rb +++ b/test/helpers/application_helper_test.rb @@ -1048,21 +1048,6 @@ EXPECTED assert_equal '

Dashes: ---

', textilizable('Dashes: ---') end - def test_footnotes - raw = <<-RAW -This is some text[1]. - -fn1. This is the foot note -RAW - - expected = <<-EXPECTED -

This is some text1.

-

1 This is the foot note

-EXPECTED - - assert_equal expected.gsub(%r{[\r\n\t]}, ''), textilizable(raw).gsub(%r{[\r\n\t]}, '') - end - def test_headings raw = 'h1. Some heading' expected = %|\n

Some heading

| 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 bbc7c9d83..059f0b83a 100644 --- a/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb +++ b/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb @@ -581,6 +581,21 @@ STR }, false) end + def test_footnotes + text = <<-STR +This is some text[1]. + +fn1. This is the foot note +STR + + expected = <<-EXPECTED +

This is some text1.

+

1 This is the foot note

+EXPECTED + + assert_equal expected.gsub(%r{[\r\n\t]}, ''), to_html(text).gsub(%r{[\r\n\t]}, '') + end + private def assert_html_output(to_test, expect_paragraph = true)