From fcea40c1286bc71c45fdd1a3c53a93a6661619ca Mon Sep 17 00:00:00 2001 From: natdeanlewissoftwire Date: Tue, 7 Feb 2023 08:59:48 +0000 Subject: [PATCH] feat: add further reconfirmation to tests --- spec/mailers/devise_notify_mailer_spec.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spec/mailers/devise_notify_mailer_spec.rb b/spec/mailers/devise_notify_mailer_spec.rb index 79e383161..a0fe9171f 100644 --- a/spec/mailers/devise_notify_mailer_spec.rb +++ b/spec/mailers/devise_notify_mailer_spec.rb @@ -61,13 +61,15 @@ RSpec.describe DeviseNotifyMailer do end end - context "when a user requests a new confirmation link" do + context "when a user requests further confirmation links" do let(:email) { "test@example.com" } it "sends re-confirmation template" do user = User.create!(name:, organisation:, email:, password:, role:) expect(notify_client).to receive(:send_email).with(hash_including(template_id: User::RECONFIRMABLE_TEMPLATE_ID)) user.send_confirmation_instructions + expect(notify_client).to receive(:send_email).with(hash_including(template_id: User::RECONFIRMABLE_TEMPLATE_ID)) + user.send_confirmation_instructions end end end