specs for comments on profile pages

This commit is contained in:
Brenda Wallace
2019-06-30 13:50:10 +12:00
committed by always-be-closing[bot]
parent 4f59ef2e43
commit b56771f9b7

View File

@@ -134,6 +134,14 @@ describe "member profile", js: true do
it { expect(page).to have_link href: post_path(post) }
end
context 'member has comments' do
let(:post) { FactoryBot.create :post }
let!(:comment) { FactoryBot.create :comment, post: post, author: member }
before { visit member_path(member) }
it { expect(page).to have_link href: post_path(post) }
it { expect(page).to have_link href: comment_path(comment) }
end
context 'photos' do
let(:planting) { FactoryBot.create :planting, owner: member }
let!(:photo) { FactoryBot.create :photo, owner: member, plantings: [planting] }