diff options
author | Go MAEDA <maeda@farend.jp> | 2018-03-02 04:58:52 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2018-03-02 04:58:52 +0000 |
commit | e9fb90856ff886d039a38b6ca9e8d03be2971154 (patch) | |
tree | f902b53163c72552c8e7334a809a1df6e04d15df /test/unit/lib | |
parent | 8d033d08d0e7ec6a9631a35dc25027fe16adb131 (diff) | |
download | redmine-e9fb90856ff886d039a38b6ca9e8d03be2971154.tar.gz redmine-e9fb90856ff886d039a38b6ca9e8d03be2971154.zip |
Move textile footnotes test to TextileFormatterTest (#28207).
Patch by Mischa The Evil.
git-svn-id: http://svn.redmine.org/redmine/trunk@17222 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/lib')
-rw-r--r-- | test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb | 15 |
1 files changed, 15 insertions, 0 deletions
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 +<p>This is some text<sup><a href=\"#fn1\">1</a></sup>.</p> +<p id="fn1" class="footnote"><sup>1</sup> This is the foot note</p> +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) |