From 832f5177c8790dfea74c40ffb6bd52ce17938217 Mon Sep 17 00:00:00 2001 From: Mischa The Evil Date: Sat, 17 Feb 2018 22:14:13 +0100 Subject: [PATCH 2/2] Move textile footnotes test to TextileFormatterTest. --- test/helpers/application_helper_test.rb | 15 --------------- .../lib/redmine/wiki_formatting/textile_formatter_test.rb | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/test/helpers/application_helper_test.rb b/test/helpers/application_helper_test.rb index 936a0ba..044c210 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 bbc7c9d..059f0b8 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) -- 1.9.1