summaryrefslogtreecommitdiffstats
path: root/test/unit/helpers
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2011-03-14 20:29:06 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2011-03-14 20:29:06 +0000
commit208d2d4090878c34e0132d1be08aa7f1587602d1 (patch)
tree48016119c5f72b9cd2eb63e0c7410d1675f6a0ff /test/unit/helpers
parentd317aec3ef4bea9ba9efe9f5d0fdfab6396c8db8 (diff)
downloadredmine-208d2d4090878c34e0132d1be08aa7f1587602d1.tar.gz
redmine-208d2d4090878c34e0132d1be08aa7f1587602d1.zip
Moved text formatting tests from application_helper tests to formatter tests.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5132 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/helpers')
-rw-r--r--test/unit/helpers/application_helper_test.rb105
1 files changed, 0 insertions, 105 deletions
diff --git a/test/unit/helpers/application_helper_test.rb b/test/unit/helpers/application_helper_test.rb
index aa2c62776..6d46aedf0 100644
--- a/test/unit/helpers/application_helper_test.rb
+++ b/test/unit/helpers/application_helper_test.rb
@@ -602,111 +602,6 @@ RAW
assert textilizable(raw).gsub("\n", "").include?(expected)
end
- def test_blockquote
- # orig raw text
- raw = <<-RAW
-John said:
-> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas sed libero.
-> Nullam commodo metus accumsan nulla. Curabitur lobortis dui id dolor.
-> * Donec odio lorem,
-> * sagittis ac,
-> * malesuada in,
-> * adipiscing eu, dolor.
->
-> >Nulla varius pulvinar diam. Proin id arcu id lorem scelerisque condimentum. Proin vehicula turpis vitae lacus.
-> Proin a tellus. Nam vel neque.
-
-He's right.
-RAW
-
- # expected html
- expected = <<-EXPECTED
-<p>John said:</p>
-<blockquote>
-Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas sed libero.
-Nullam commodo metus accumsan nulla. Curabitur lobortis dui id dolor.
-<ul>
- <li>Donec odio lorem,</li>
- <li>sagittis ac,</li>
- <li>malesuada in,</li>
- <li>adipiscing eu, dolor.</li>
-</ul>
-<blockquote>
-<p>Nulla varius pulvinar diam. Proin id arcu id lorem scelerisque condimentum. Proin vehicula turpis vitae lacus.</p>
-</blockquote>
-<p>Proin a tellus. Nam vel neque.</p>
-</blockquote>
-<p>He's right.</p>
-EXPECTED
-
- assert_equal expected.gsub(%r{\s+}, ''), textilizable(raw).gsub(%r{\s+}, '')
- end
-
- def test_table
- raw = <<-RAW
-This is a table with empty cells:
-
-|cell11|cell12||
-|cell21||cell23|
-|cell31|cell32|cell33|
-RAW
-
- expected = <<-EXPECTED
-<p>This is a table with empty cells:</p>
-
-<table>
- <tr><td>cell11</td><td>cell12</td><td></td></tr>
- <tr><td>cell21</td><td></td><td>cell23</td></tr>
- <tr><td>cell31</td><td>cell32</td><td>cell33</td></tr>
-</table>
-EXPECTED
-
- assert_equal expected.gsub(%r{\s+}, ''), textilizable(raw).gsub(%r{\s+}, '')
- end
-
- def test_table_with_line_breaks
- raw = <<-RAW
-This is a table with line breaks:
-
-|cell11
-continued|cell12||
-|-cell21-||cell23
-cell23 line2
-cell23 *line3*|
-|cell31|cell32
-cell32 line2|cell33|
-
-RAW
-
- expected = <<-EXPECTED
-<p>This is a table with line breaks:</p>
-
-<table>
- <tr>
- <td>cell11<br />continued</td>
- <td>cell12</td>
- <td></td>
- </tr>
- <tr>
- <td><del>cell21</del></td>
- <td></td>
- <td>cell23<br/>cell23 line2<br/>cell23 <strong>line3</strong></td>
- </tr>
- <tr>
- <td>cell31</td>
- <td>cell32<br/>cell32 line2</td>
- <td>cell33</td>
- </tr>
-</table>
-EXPECTED
-
- assert_equal expected.gsub(%r{\s+}, ''), textilizable(raw).gsub(%r{\s+}, '')
- end
-
- def test_textile_should_not_mangle_brackets
- assert_equal '<p>[msg1][msg2]</p>', textilizable('[msg1][msg2]')
- end
-
def test_default_formatter
Setting.text_formatting = 'unknown'
text = 'a *link*: http://www.example.net/'