]> source.dussan.org Git - redmine.git/commitdiff
Move textile footnotes test to TextileFormatterTest (#28207).
authorGo MAEDA <maeda@farend.jp>
Fri, 2 Mar 2018 04:58:52 +0000 (04:58 +0000)
committerGo MAEDA <maeda@farend.jp>
Fri, 2 Mar 2018 04:58:52 +0000 (04:58 +0000)
Patch by Mischa The Evil.

git-svn-id: http://svn.redmine.org/redmine/trunk@17222 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/helpers/application_helper_test.rb
test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb

index 17d4a14c231553aa9acefa836cc693e16aa2b1d9..81b3f7859954a513238989f4499405310c062fa4 100644 (file)
@@ -1048,21 +1048,6 @@ EXPECTED
     assert_equal '<p>Dashes: ---</p>', textilizable('Dashes: ---')
   end
 
-  def test_footnotes
-    raw = <<-RAW
-This is some text[1].
-
-fn1. This is the foot note
-RAW
-
-    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]}, ''), textilizable(raw).gsub(%r{[\r\n\t]}, '')
-  end
-
   def test_headings
     raw = 'h1. Some heading'
     expected = %|<a name="Some-heading"></a>\n<h1 >Some heading<a href="#Some-heading" class="wiki-anchor">&para;</a></h1>|
index bbc7c9d830d607eb979e49e0bef90cb07e12535c..059f0b83a0c9ef9d273d811a048ce7c1b93607f6 100644 (file)
@@ -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)