Files
growstuff/spec/views/comments/edit.html.haml_spec.rb
Miles Gould ade199c17b Better links for posts.
- add Permalink
 - show Reply instead of "Comment" (iff you can comment)
 - Edit link shows if you have permission to edit
 - reorganised tests for post/_single
 - posts/_single now requires current_user; patch tests for comments.
2013-02-27 12:53:50 +00:00

18 lines
482 B
Ruby

require 'spec_helper'
describe "comments/edit" do
before(:each) do
controller.stub(:current_user) { nil }
assign(:comment, FactoryGirl.create(:comment))
end
it "renders the edit comment form" do
render
# Run the generator again with the --webrat flag if you want to use webrat matchers
assert_select "form", :action => comments_path(@comment), :method => "post" do
assert_select "textarea#comment_body", :name => "comment[body]"
end
end
end