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

(-)a/t/db_dependent/Circulation.t (-2 / +14 lines)
Lines 274-280 Koha::CirculationRules->set_rules( Link Here
274
274
275
my ( $reused_itemnumber_1, $reused_itemnumber_2 );
275
my ( $reused_itemnumber_1, $reused_itemnumber_2 );
276
subtest "CanBookBeRenewed tests" => sub {
276
subtest "CanBookBeRenewed tests" => sub {
277
    plan tests => 71;
277
    plan tests => 75;
278
278
279
    C4::Context->set_preference('ItemsDeniedRenewal','');
279
    C4::Context->set_preference('ItemsDeniedRenewal','');
280
    # Generate test biblio
280
    # Generate test biblio
Lines 611-616 subtest "CanBookBeRenewed tests" => sub { Link Here
611
    is( $renewokay, 0, 'Bug 14101: Cannot renew, renewal is automatic and premature' );
611
    is( $renewokay, 0, 'Bug 14101: Cannot renew, renewal is automatic and premature' );
612
    is( $error, 'auto_too_soon',
612
    is( $error, 'auto_too_soon',
613
        'Bug 14101: Cannot renew, renewal is automatic and premature, "No renewal before" = undef (returned code is auto_too_soon)' );
613
        'Bug 14101: Cannot renew, renewal is automatic and premature, "No renewal before" = undef (returned code is auto_too_soon)' );
614
    AddReserve(
615
        $branch, $reserving_borrowernumber, $biblio->biblionumber,
616
        $bibitems,  $priority, $resdate, $expdate, $notes,
617
        'a title', $item_4->itemnumber, $found
618
    );
619
    ( $renewokay, $error ) = CanBookBeRenewed( $renewing_borrowernumber, $item_4->itemnumber );
620
    is( $renewokay, 0, 'Still should not be able to renew' );
621
    is( $error, 'auto_too_soon', 'returned code is auto_too_soon, reserve not checked' );
622
    ( $renewokay, $error ) = CanBookBeRenewed( $renewing_borrowernumber, $item_4->itemnumber, 1 );
623
    is( $renewokay, 0, 'Still should not be able to renew' );
624
    is( $error, 'on_reserve', 'returned code is on_reserve, auto_too_soon limit is overridden' );
625
626
614
627
615
    # Bug 7413
628
    # Bug 7413
616
    # Test premature manual renewal
629
    # Test premature manual renewal
617
- 

Return to bug 19014