Patch #28207 » 0002-Move-textile-footnotes-test-to-TextileFormatterTest.patch
| test/helpers/application_helper_test.rb | ||
|---|---|---|
|
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">¶</a></h1>|
|
||
| test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb | ||
|---|---|---|
|
}, 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)
|
||
- « Previous
- 1
- 2
- Next »