Files
growstuff/spec/views/comments/edit.html.haml_spec.rb
2018-02-09 07:58:47 +13:00

18 lines
473 B
Ruby

require 'rails_helper'
describe "comments/edit" do
before(:each) do
controller.stub(:current_user) { nil }
assign(:comment, FactoryBot.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