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

(-)a/t/db_dependent/SIP/Message.t (-2 / +9 lines)
Lines 58-64 subtest 'Testing Patron Status Request V2' => sub { Link Here
58
subtest 'Testing Patron Info Request V2' => sub {
58
subtest 'Testing Patron Info Request V2' => sub {
59
    my $schema = Koha::Database->new->schema;
59
    my $schema = Koha::Database->new->schema;
60
    $schema->storage->txn_begin;
60
    $schema->storage->txn_begin;
61
    plan tests => 18;
61
    plan tests => 20;
62
    $C4::SIP::Sip::protocol_version = 2;
62
    $C4::SIP::Sip::protocol_version = 2;
63
    test_request_patron_info_v2();
63
    test_request_patron_info_v2();
64
    $schema->storage->txn_rollback;
64
    $schema->storage->txn_rollback;
Lines 270-275 sub test_request_patron_info_v2 { Link Here
270
    $respcode = substr( $response, 0, 2 );
270
    $respcode = substr( $response, 0, 2 );
271
    check_field( $respcode, $response, FID_VALID_PATRON_PWD, 'Y', 'code CQ should be Y if empty AD allowed' );
271
    check_field( $respcode, $response, FID_VALID_PATRON_PWD, 'Y', 'code CQ should be Y if empty AD allowed' );
272
272
273
    t::lib::Mocks::mock_preference( 'FailedLoginAttempts', '1' );
274
    my $patron = Koha::Patrons->find({ cardnumber => $card });
275
    $patron->update({ login_attempts => 0 });
276
    is( $patron->account_locked, 0, "Patron account not locked already" );
277
    $msg->handle_patron_info( $server );
278
    $patron = Koha::Patrons->find({ cardnumber => $card });
279
    is( $patron->account_locked, 0, "Patron account is not locked by patron info messages with empty password" );
280
273
    # Finally, we send a wrong card number
281
    # Finally, we send a wrong card number
274
    Koha::Patrons->search({ cardnumber => $card })->delete;
282
    Koha::Patrons->search({ cardnumber => $card })->delete;
275
    undef $findpatron;
283
    undef $findpatron;
276
- 

Return to bug 21997