Merge pull request #6116 from betagouv/fix-flaky-experts-test

spec: fix flaky expert test
This commit is contained in:
Kara Diaby 2021-04-20 12:53:50 +02:00 committed by GitHub
commit c62751d006
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -42,7 +42,7 @@ feature 'Inviting an expert:', js: true do
expect(emails_sent_to(expert2.email.to_s).size).to eq(1)
invitation_email = open_email(expert.email.to_s)
avis = expert.avis.reload.last
avis = expert.avis.find_by(dossier: dossier)
sign_up_link = sign_up_expert_avis_path(avis.dossier.procedure, avis, avis.expert.email)
expect(invitation_email.body).to include(sign_up_link)
end