View | Details | Raw Unified | Return to bug 30588
Collapse All | Expand All

(-)a/t/db_dependent/Auth.t (-1 / +8 lines)
Lines 192-197 subtest 'checkauth() tests' => sub { Link Here
192
        ( $userid, $cookie, $sessionID, $flags ) = C4::Auth::checkauth( $cgi, 'authrequired', undef, 'intranet' );
192
        ( $userid, $cookie, $sessionID, $flags ) = C4::Auth::checkauth( $cgi, 'authrequired', undef, 'intranet' );
193
        is( $userid, $patron->userid, 'Succesful login' );
193
        is( $userid, $patron->userid, 'Succesful login' );
194
        is( C4::Auth::get_session($sessionID)->param('waiting-for-2FA'), 0, 'Second auth no longer required if OTP token has been verified' );
194
        is( C4::Auth::get_session($sessionID)->param('waiting-for-2FA'), 0, 'Second auth no longer required if OTP token has been verified' );
195
        logout($cgi);
196
197
        t::lib::Mocks::mock_preference( 'TwoFactorAuthentication', 'enforced' );
198
        $patron->auth_method('password')->store;
199
        ( $userid, $cookie, $sessionID, $flags ) = C4::Auth::checkauth( $cgi, 'authrequired', undef, 'intranet' );
200
        is( $userid, $patron->userid, 'Succesful login' );
201
        is( C4::Auth::get_session($sessionID)->param('waiting-for-2FA-setup'), 1, 'Setup 2FA required' );
202
        logout($cgi);
195
203
196
        t::lib::Mocks::mock_preference( 'TwoFactorAuthentication', 'disabled' );
204
        t::lib::Mocks::mock_preference( 'TwoFactorAuthentication', 'disabled' );
197
    };
205
    };
198
- 

Return to bug 30588