This commit is contained in:
Mathieu Magnin 2024-09-26 17:36:12 +02:00
parent 64297f9ee8
commit 687617cb08
No known key found for this signature in database
GPG key ID: 8DCAFC82D7BA654E
3 changed files with 5 additions and 3 deletions

View file

@ -83,7 +83,8 @@ describe Procedure::ErrorsSummary, type: :component do
include Logic include Logic
let(:validation_context) { :publication } let(:validation_context) { :publication }
let(:procedure) { create(:procedure, attestation_template:, initiated_mail:) } let(:expired_token) { JWT.encode({ exp: 2.days.ago.to_i }, nil, 'none') }
let(:procedure) { create(:procedure, attestation_template:, initiated_mail:, api_entreprise_token: expired_token) }
let(:attestation_template) { build(:attestation_template) } let(:attestation_template) { build(:attestation_template) }
let(:initiated_mail) { build(:initiated_mail) } let(:initiated_mail) { build(:initiated_mail) }
@ -97,6 +98,7 @@ describe Procedure::ErrorsSummary, type: :component do
expect(page).to have_selector("a", text: "Les règles dinéligibilité") expect(page).to have_selector("a", text: "Les règles dinéligibilité")
expect(page).to have_selector("a", text: "Le modèle dattestation") expect(page).to have_selector("a", text: "Le modèle dattestation")
expect(page).to have_selector("a", text: "Lemail de notification de passage de dossier en instruction") expect(page).to have_selector("a", text: "Lemail de notification de passage de dossier en instruction")
expect(page).to have_selector("a", text: "Jeton API Entreprise")
expect(page).to have_text("n'est pas valide", count: 2) expect(page).to have_text("n'est pas valide", count: 2)
end end
end end