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 ); };