Fix liked photo spec

This commit is contained in:
Brenda Wallace
2019-07-12 22:27:55 +12:00
committed by always-be-closing[bot]
parent efe14d43cb
commit 3cd67bcc9f

View File

@@ -31,9 +31,9 @@ describe Photo do
it { expect(planting.crop.default_photo).to eq photo }
describe 'and someone likes the old photo' do
before { Like.create(likeable: old_photo) }
it { expect(planting.default_photo).to eq photo }
it { expect(planting.crop.default_photo).to eq photo }
before { FactoryBot.create :like, likeable: old_photo }
it { expect(planting.default_photo).to eq old_photo }
it { expect(planting.crop.default_photo).to eq old_photo }
end
end
end