set body on post in spec, so we know what to look for

and we don't trip on whitespace changes
This commit is contained in:
Brenda Wallace
2019-06-25 09:01:37 +12:00
parent 191a3940d7
commit 3e0f6c476f

View File

@@ -3,7 +3,7 @@ require 'rails_helper'
describe "comments/new" do
before do
controller.stub(:current_user) { nil }
@post = FactoryBot.create(:post)
@post = FactoryBot.create(:post, body: 'tena koutou ki te ao')
@comment = FactoryBot.create(:comment, post: @post)
assign(:comment, @comment)
assign(:comments, [@comment])