Merge pull request #10761 from demarches-simplifiees/fix-10754
ETQ Instructeur, si je n'ai pas vérifié mon email je dois quand même recevoir un email avec login token
This commit is contained in:
commit
8d68bebaed
4 changed files with 7 additions and 0 deletions
|
@ -217,6 +217,7 @@ describe Users::SessionsController, type: :controller do
|
|||
it { is_expected.to redirect_to root_path }
|
||||
it { expect(controller.current_instructeur).to eq(instructeur) }
|
||||
it { expect(controller).to have_received(:trust_device) }
|
||||
it { expect(controller.current_instructeur.user.email_verified_at).not_to be_nil }
|
||||
end
|
||||
|
||||
context 'when the token is invalid' do
|
||||
|
|
|
@ -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…
Add table
Add a link
Reference in a new issue