Skip to content

Commit

Permalink
added passing test for redcloth formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
flavorjones committed Oct 29, 2008
1 parent 37fcfcc commit db842bb
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/unit/post_test.rb
Expand Up @@ -52,6 +52,20 @@ def test_format_html
assert_equal 0, h.search('br').size # when we try to redclothify html, this fails.
end

def test_format_redcloth
content = <<-EOF
h1. redcloth
this is a redcloth document.
really a problem?
EOF
assert post = create_post(:content => content)
assert h = Hpricot.parse(post.to_html)
assert_equal 1, h.search('h1').size
assert_equal 2, h.search('p').size
end

protected

def create_post(options={})
Expand Down

0 comments on commit db842bb

Please sign in to comment.