From 1f768a2e529338da0118eb656503d1dc57961cc3 Mon Sep 17 00:00:00 2001 From: Jay Joshua <7008757+jayjay-w@users.noreply.github.com> Date: Wed, 31 Jan 2024 13:51:14 +0100 Subject: [PATCH] Don't confirm user when testing account lockout (#1787) Confirming triggers the DeviseMailer.invitation_instructions job, which isn't intended --- test/controllers/sessions_controller_test.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/controllers/sessions_controller_test.rb b/test/controllers/sessions_controller_test.rb index ce63e1c7c0..73200f66bd 100644 --- a/test/controllers/sessions_controller_test.rb +++ b/test/controllers/sessions_controller_test.rb @@ -73,7 +73,6 @@ def setup test "should lock user after excessive login requests" do u = create_user login: 'test', password: '12345678', password_confirmation: '12345678', email: 'test@test.com' - u.confirm Devise.maximum_attempts = 2 2.times do @@ -87,7 +86,6 @@ def setup test "should unlock locked user accounts after specified time" do u = create_user login: 'test', password: '12345678', password_confirmation: '12345678', email: 'test@test.com' - u.confirm maximum_attempts = Devise.maximum_attempts maximum_attempts.times do