mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-05-07 23:36:15 -04:00
tests for markdown
This commit is contained in:
@@ -3,7 +3,8 @@
|
||||
%p#notice= notice
|
||||
|
||||
%p
|
||||
= @forum.description
|
||||
:markdown
|
||||
#{ strip_tags(@forum.description) }
|
||||
%p
|
||||
This forum is run by
|
||||
= link_to @forum.owner, @forum.owner
|
||||
|
||||
@@ -10,4 +10,8 @@ describe "forums/index" do
|
||||
it "renders a list of forums" do
|
||||
assert_select "h2", :text => @forum1.name, :count => 2
|
||||
end
|
||||
|
||||
it "parses markdown description into html" do
|
||||
assert_select "em", "Everything"
|
||||
end
|
||||
end
|
||||
|
||||
@@ -7,10 +7,14 @@ describe "forums/show" do
|
||||
end
|
||||
|
||||
it "renders attributes" do
|
||||
rendered.should contain @forum.description
|
||||
rendered.should contain "Everything about permaculture"
|
||||
rendered.should contain @forum.owner.to_s
|
||||
end
|
||||
|
||||
it "parses markdown description into html" do
|
||||
assert_select "em", "Everything"
|
||||
end
|
||||
|
||||
it 'links to new post with the forum id' do
|
||||
assert_select "a[href=#{new_post_path(:forum_id => @forum.id)}]"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user