assert_equal("<p>This is worded <strong>strongly</strong><script>code!</script></p>",textilize("This is worded <strong>strongly</strong><script>code!</script>",:safe))
end
deftest_textilize_should_not_sanitize_safe_input
assert_equal("<p>This is worded <strong>strongly</strong><script>code!</script></p>",textilize("This is worded <strong>strongly</strong><script>code!</script>".html_safe))
end
deftest_textilize_with_hard_breaks
assert_equal("<p>This is one scary world.<br />\n True.</p>",textilize("This is one scary world.\n True."))
textilize_without_paragraph("*This is Textile!* Rejoice!").html_safe?
end
deftest_textilize_without_paragraph
assert_equal("<strong>This is Textile!</strong> Rejoice!",textilize_without_paragraph("*This is Textile!* Rejoice!"))
end
deftest_textilize_without_paragraph_with_blank
assert_equal("",textilize_without_paragraph(""))
end
deftest_textilize_without_paragraph_with_options
assert_equal("This is worded <strong>strongly</strong>",textilize_without_paragraph("This is worded <strong>strongly</strong>",:filter_html))
assert_equal("This is worded <strong>strongly</strong><script>code!</script>",textilize_without_paragraph("This is worded <strong>strongly</strong><script>code!</script>",:safe))
assert_equal("This is worded <strong>strongly</strong><script>code!</script>",textilize_without_paragraph("This is worded <strong>strongly</strong><script>code!</script>".html_safe))
assert_equal("<p>This is worded <strong>strongly</strong><script>code!</script></p>",markdown("This is worded <strong>strongly</strong><script>code!</script>",:safe))
end
deftest_markdown_should_not_sanitize_safe_input
assert_equal("<p>This is worded <strong>strongly</strong><script>code!</script></p>",markdown("This is worded <strong>strongly</strong><script>code!</script>".html_safe))
end
deftest_markdown_with_hard_breaks
assert_equal("<p>This is one scary world.</p>\n\n<p>True.</p>",markdown("This is one scary world.\n\nTrue."))