Browse Source

feat: add further reconfirmation to tests

pull/1265/head
natdeanlewissoftwire 3 years ago
parent
commit
fcea40c128
  1. 4
      spec/mailers/devise_notify_mailer_spec.rb

4
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

Loading…
Cancel
Save