[#10754] bypass unverified mail protection for login token emails
This commit is contained in:
parent
915779c9b0
commit
95eb9ef9d4
2 changed files with 4 additions and 0 deletions
|
@ -36,6 +36,8 @@ class InstructeurMailer < ApplicationMailer
|
|||
@login_token = login_token
|
||||
subject = "Connexion sécurisée à #{Current.application_name}"
|
||||
|
||||
bypass_unverified_mail_protection!
|
||||
|
||||
mail(to: instructeur.email, subject: subject)
|
||||
end
|
||||
|
||||
|
|
|
@ -24,6 +24,8 @@ RSpec.describe InstructeurMailer, type: :mailer do
|
|||
let(:token) { SecureRandom.hex }
|
||||
subject { described_class.send_login_token(user, token) }
|
||||
|
||||
it { expect(subject[BalancerDeliveryMethod::BYPASS_UNVERIFIED_MAIL_PROTECTION]).to be_present }
|
||||
|
||||
context 'without SafeMailer configured' do
|
||||
it { expect(subject[BalancerDeliveryMethod::FORCE_DELIVERY_METHOD_HEADER]&.value).to eq(nil) }
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue