Bug 31247: Add tests
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e9891b84fe
)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
33fb60358f
commit
8da1b675ff
1 changed files with 5 additions and 0 deletions
|
@ -193,6 +193,11 @@ subtest 'checkauth() tests' => sub {
|
||||||
is( $userid, $patron->userid, 'Succesful login' );
|
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' );
|
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 );
|
t::lib::Mocks::mock_preference( 'TwoFactorAuthentication', 0 );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue