Files
growstuff/spec/views/comments/edit.html.haml_spec.rb
Daniel O'Connor f1acb35520 Merge pull request #4537 from Growstuff/FactoryBot/SyntaxMethods
Rubocop: FactoryBot/SyntaxMethods
2026-04-23 22:29:24 +09:30

23 lines
561 B
Ruby

# frozen_string_literal: true
require 'rails_helper'
describe "comments/edit" do
let(:comment) { create(:comment) }
before do
controller.stub(:current_user) { nil }
assign(:comment, comment)
assign(:commentable, comment.commentable)
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