Bug 28998: Fix Auth.
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 5 May 2022 11:28:19 +0000 (13:28 +0200)
committerTomas Cohen Arazi <tomascohen@theke.io>
Thu, 5 May 2022 11:30:25 +0000 (08:30 -0300)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
t/db_dependent/Auth.t

index 4c29f2c..0ec2570 100755 (executable)
@@ -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' );