From 6260f690b36cd9dbdae3c3b8703b640f28ac0e03 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 27 Jul 2022 17:52:34 +0200 Subject: [PATCH] Bug 31247: Add tests Signed-off-by: Caroline Cyr La Rose --- t/db_dependent/Auth.t | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/t/db_dependent/Auth.t b/t/db_dependent/Auth.t index ed1973ec5f..58f64ce927 100755 --- a/t/db_dependent/Auth.t +++ b/t/db_dependent/Auth.t @@ -193,6 +193,11 @@ subtest 'checkauth() tests' => sub { is( $userid, $patron->userid, 'Succesful login' ); is( C4::Auth::get_session($sessionID)->param('waiting-for-2FA'), 0, 'Second auth no longer required if OTP token has been verified' ); + logout($cgi); + ( $userid, $cookie, $sessionID, $flags ) = C4::Auth::checkauth( $cgi, 'authrequired', undef, 'opac' ); + is( $userid, $patron->userid, 'Succesful login at the OPAC' ); + is( C4::Auth::get_session($sessionID)->param('waiting-for-2FA'), undef, 'No second auth required at the OPAC' ); + t::lib::Mocks::mock_preference( 'TwoFactorAuthentication', 0 ); }; -- 2.25.1