Skip to content

Commit

Permalink
Fix markdown tests
Browse files Browse the repository at this point in the history
  • Loading branch information
amercader committed Dec 10, 2015
1 parent 8ee0f3e commit d9b8f3a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ckan/new_tests/lib/test_helpers.py
Expand Up @@ -56,22 +56,22 @@ def test_render_markdown_allow_html(self):

def test_render_markdown_not_allow_html(self):
data = '<h1>moo</h1>'
output = '<p>moo\n</p>'
output = '<p>moo</p>'
eq_(h.render_markdown(data), output)

def test_render_markdown_auto_link_without_path(self):
data = 'http://example.com'
output = '<p><a href="http://example.com" target="_blank" rel="nofollow">http://example.com</a>\n</p>'
output = '<p><a href="http://example.com" target="_blank" rel="nofollow">http://example.com</a></p>'
eq_(h.render_markdown(data), output)

def test_render_markdown_auto_link(self):
data = 'https://example.com/page.html'
output = '<p><a href="https://example.com/page.html" target="_blank" rel="nofollow">https://example.com/page.html</a>\n</p>'
output = '<p><a href="https://example.com/page.html" target="_blank" rel="nofollow">https://example.com/page.html</a></p>'
eq_(h.render_markdown(data), output)

def test_render_markdown_auto_link_ignoring_trailing_punctuation(self):
data = 'My link: http://example.com/page.html.'
output = '<p>My link: <a href="http://example.com/page.html" target="_blank" rel="nofollow">http://example.com/page.html</a>.\n</p>'
output = '<p>My link: <a href="http://example.com/page.html" target="_blank" rel="nofollow">http://example.com/page.html</a>.</p>'
eq_(h.render_markdown(data), output)


Expand Down

0 comments on commit d9b8f3a

Please sign in to comment.