amelioration(mail.prioritaire): en plus des mails de device, ajoute la gestion du routage des autres mails critique
This commit is contained in:
parent
e6b29af2ac
commit
4990c448b1
11 changed files with 118 additions and 7 deletions
|
@ -15,6 +15,16 @@ RSpec.describe UserMailer, type: :mailer do
|
|||
|
||||
it { expect(subject.body).to have_link("Commencer la démarche « #{procedure.libelle} »", href: commencer_sign_in_url(path: procedure.path)) }
|
||||
end
|
||||
|
||||
context 'without SafeMailer configured' do
|
||||
it { expect(subject[BalancerDeliveryMethod::FORCE_DELIVERY_METHOD_HEADER]&.value).to eq(nil) }
|
||||
end
|
||||
|
||||
context 'with SafeMailer configured' do
|
||||
let(:forced_delivery_method) { :kikoo }
|
||||
before { allow(SafeMailer).to receive(:forced_delivery_method).and_return(forced_delivery_method) }
|
||||
it { expect(subject[BalancerDeliveryMethod::FORCE_DELIVERY_METHOD_HEADER]&.value).to eq(forced_delivery_method.to_s) }
|
||||
end
|
||||
end
|
||||
|
||||
describe '.ask_for_merge' do
|
||||
|
@ -24,6 +34,16 @@ RSpec.describe UserMailer, type: :mailer do
|
|||
|
||||
it { expect(subject.to).to eq([requested_email]) }
|
||||
it { expect(subject.body).to include(requested_email) }
|
||||
|
||||
context 'without SafeMailer configured' do
|
||||
it { expect(subject[BalancerDeliveryMethod::FORCE_DELIVERY_METHOD_HEADER]&.value).to eq(nil) }
|
||||
end
|
||||
|
||||
context 'with SafeMailer configured' do
|
||||
let(:forced_delivery_method) { :kikoo }
|
||||
before { allow(SafeMailer).to receive(:forced_delivery_method).and_return(forced_delivery_method) }
|
||||
it { expect(subject[BalancerDeliveryMethod::FORCE_DELIVERY_METHOD_HEADER]&.value).to eq(forced_delivery_method.to_s) }
|
||||
end
|
||||
end
|
||||
|
||||
describe '.france_connect_merge_confirmation' do
|
||||
|
@ -34,6 +54,16 @@ RSpec.describe UserMailer, type: :mailer do
|
|||
|
||||
it { expect(subject.to).to eq([email]) }
|
||||
it { expect(subject.body).to include(france_connect_particulier_mail_merge_with_existing_account_url(merge_token: code)) }
|
||||
|
||||
context 'without SafeMailer configured' do
|
||||
it { expect(subject[BalancerDeliveryMethod::FORCE_DELIVERY_METHOD_HEADER]&.value).to eq(nil) }
|
||||
end
|
||||
|
||||
context 'with SafeMailer configured' do
|
||||
let(:forced_delivery_method) { :kikoo }
|
||||
before { allow(SafeMailer).to receive(:forced_delivery_method).and_return(forced_delivery_method) }
|
||||
it { expect(subject[BalancerDeliveryMethod::FORCE_DELIVERY_METHOD_HEADER]&.value).to eq(forced_delivery_method.to_s) }
|
||||
end
|
||||
end
|
||||
|
||||
describe '.send_archive' do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue