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

(-)a/t/db_dependent/Circulation.t (-5 / +10 lines)
Lines 489-498 C4::Context->dbh->do("DELETE FROM accountlines"); Link Here
489
    $new_log_size =  scalar(@{GetLogs( $date, $date, undef,["CIRCULATION"], ["RENEWAL"]) } );
489
    $new_log_size =  scalar(@{GetLogs( $date, $date, undef,["CIRCULATION"], ["RENEWAL"]) } );
490
    is ($new_log_size, $old_log_size + 1, 'renew log successfully added');
490
    is ($new_log_size, $old_log_size + 1, 'renew log successfully added');
491
491
492
492
    my $fines = Koha::Account::Lines->search( { borrowernumber => $renewing_borrower->{borrowernumber}, itemnumber => $itemnumber7 } );
493
    $fine = $schema->resultset('Accountline')->single( { borrowernumber => $renewing_borrower->{borrowernumber}, itemnumber => $itemnumber7 } );
493
    if ( C4::Context->preference('finesMode') eq 'production' ) {
494
    is( $fine->accounttype, 'F', 'Fine on renewed item is closed out properly' );
494
        is( $fines->count, 2 );
495
    $fine->delete();
495
        is( $fines->next->accounttype, 'F', 'Fine on renewed item is closed out properly' );
496
        is( $fines->next->accounttype, 'F', 'Fine on renewed item is closed out properly' );
497
    } else {
498
        is( $fines->count, 1 );
499
        is( $fines->next->accounttype, 'F', 'Fine on renewed item is closed out properly' );
500
    }
501
    $fines->delete();
496
502
497
    t::lib::Mocks::mock_preference('OverduesBlockRenewing','blockitem');
503
    t::lib::Mocks::mock_preference('OverduesBlockRenewing','blockitem');
498
    ( $renewokay, $error ) = CanBookBeRenewed($renewing_borrowernumber, $itemnumber6);
504
    ( $renewokay, $error ) = CanBookBeRenewed($renewing_borrowernumber, $itemnumber6);
499
- 

Return to bug 18802