Fix (Expert): clear emails before feature tests

Failures:

  1) Inviting an expert: as an Instructeur I can invite an expert
     Failure/Error: invitation_email = open_email(expert.email.to_s)

Diff:
  -/procedures/2/avis/2/sign_up/email/expert1@expert.com
  +/procedures/1/avis/1/sign_up/email/expert1@expert.com
This commit is contained in:
François Vantomme 2021-04-14 21:45:32 +02:00
parent 299a98b3cb
commit 9ff7fa73e4
No known key found for this signature in database
GPG key ID: 75A448E06F6B75F8

View file

@ -10,6 +10,10 @@ describe 'Inviting an expert:', js: true do
let(:dossier) { create(:dossier, :en_construction, :with_dossier_link, procedure: procedure) } let(:dossier) { create(:dossier, :en_construction, :with_dossier_link, procedure: procedure) }
let(:linked_dossier) { Dossier.find_by(id: dossier.reload.champs.filter(&:dossier_link?).filter_map(&:value)) } let(:linked_dossier) { Dossier.find_by(id: dossier.reload.champs.filter(&:dossier_link?).filter_map(&:value)) }
before do
clear_emails
end
context 'as an Instructeur' do context 'as an Instructeur' do
scenario 'I can invite an expert' do scenario 'I can invite an expert' do
allow(ClamavService).to receive(:safe_file?).and_return(true) allow(ClamavService).to receive(:safe_file?).and_return(true)