From d9ebe0d2ab2ca667ac821fe1720833c4246cfa9e Mon Sep 17 00:00:00 2001 From: Peter Leitzen <pleitzen@gitlab.com> Date: Tue, 17 Nov 2020 12:20:07 +0100 Subject: [PATCH] Fix kwargs deprecation warnings in session controller specs --- ee/spec/controllers/ee/admin/sessions_controller_spec.rb | 2 +- ee/spec/controllers/ee/sessions_controller_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ee/spec/controllers/ee/admin/sessions_controller_spec.rb b/ee/spec/controllers/ee/admin/sessions_controller_spec.rb index 0a2fa078f1c..a9c35c23efe 100644 --- a/ee/spec/controllers/ee/admin/sessions_controller_spec.rb +++ b/ee/spec/controllers/ee/admin/sessions_controller_spec.rb @@ -7,7 +7,7 @@ RSpec.describe Admin::SessionsController, :do_not_mock_admin_mode do describe '#create' do context 'when using two-factor authentication' do - def authenticate_2fa(user_params, otp_user_id: user.id) + def authenticate_2fa(otp_user_id: user.id, **user_params) post(:create, params: { user: user_params }, session: { otp_user_id: otp_user_id }) end diff --git a/ee/spec/controllers/ee/sessions_controller_spec.rb b/ee/spec/controllers/ee/sessions_controller_spec.rb index d133f175ae9..7f121a38250 100644 --- a/ee/spec/controllers/ee/sessions_controller_spec.rb +++ b/ee/spec/controllers/ee/sessions_controller_spec.rb @@ -90,7 +90,7 @@ RSpec.describe SessionsController, :geo do end context 'when using two-factor authentication' do - def authenticate_2fa(user_params, otp_user_id: user.id) + def authenticate_2fa(otp_user_id: user.id, **user_params) post(:create, params: { user: user_params }, session: { otp_user_id: otp_user_id }) end -- 2.30.9