models: require belong_to associations on avis

This commit is contained in:
Pierre de La Morinerie 2020-07-20 14:32:22 +00:00
parent aefdd5d2a1
commit 32e55a6d37
3 changed files with 8 additions and 3 deletions

View file

@ -87,7 +87,7 @@ RSpec.describe Avis, type: :model do
describe '#try_to_assign_instructeur' do
let!(:instructeur) { create(:instructeur) }
let(:avis) { Avis.create(claimant: claimant, email: email, dossier: create(:dossier)) }
let(:avis) { create(:avis, claimant: claimant, email: email, dossier: create(:dossier)) }
context 'when the email belongs to a instructeur' do
let(:email) { instructeur.email }