diff --git a/test/controllers/mfa_controller_test.rb b/test/controllers/mfa_controller_test.rb
index e2e24417..49e4b622 100644
--- a/test/controllers/mfa_controller_test.rb
+++ b/test/controllers/mfa_controller_test.rb
@@ -7,7 +7,9 @@ class MfaControllerTest < ActionDispatch::IntegrationTest
end
def sign_out
- delete session_path(@user.sessions.last) if @user.sessions.any?
+ @user.sessions.each do |session|
+ delete session_path(session)
+ end
end
test "redirects to root if MFA already enabled" do
diff --git a/test/controllers/onboardings_controller_test.rb b/test/controllers/onboardings_controller_test.rb
index 129aaecf..c35c1409 100644
--- a/test/controllers/onboardings_controller_test.rb
+++ b/test/controllers/onboardings_controller_test.rb
@@ -162,6 +162,8 @@ end
private
def sign_out
- delete session_path(@user.sessions.last) if @user.sessions.any?
-end
+ @user.sessions.each do |session|
+ delete session_path(session)
+ end
+ end
end