From 32a6a00795f5e5d168d599dc16ce8336519b697e Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 5 May 2022 13:28:19 +0200 Subject: [PATCH] Bug 28998: Fix Auth. --- t/db_dependent/Auth.t | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/Auth.t b/t/db_dependent/Auth.t index 4c29f2c1fb6..0ec2570bb9a 100755 --- a/t/db_dependent/Auth.t +++ b/t/db_dependent/Auth.t @@ -148,7 +148,9 @@ subtest 'checkauth() tests' => sub { } t::lib::Mocks::mock_preference( 'TwoFactorAuthentication', 0 ); - $patron->auth_method('password')->store; + $patron->secret('one_secret'); + $patron->auth_method('password'); + $patron->store; ( $userid, $cookie, $sessionID, $flags ) = C4::Auth::checkauth( $cgi, 'authrequired', undef, 'intranet' ); is( $userid, $patron->userid, 'Succesful login' ); is( C4::Auth::get_session($sessionID)->param('waiting-for-2FA'), undef, 'Second auth not required' ); -- 2.25.1