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 627-632 subtest "CanBookBeRenewed tests" => sub { Link Here
627
    is( $renewokay, 0, 'Bug 14101: Cannot renew, renewal is automatic and premature' );
627
    is( $renewokay, 0, 'Bug 14101: Cannot renew, renewal is automatic and premature' );
628
    is( $error, 'auto_too_soon',
628
    is( $error, 'auto_too_soon',
629
        'Bug 14101: Cannot renew, renewal is automatic and premature, "No renewal before" = undef (returned code is auto_too_soon)' );
629
        'Bug 14101: Cannot renew, renewal is automatic and premature, "No renewal before" = undef (returned code is auto_too_soon)' );
630
    AddReserve(
631
        $branch, $reserving_borrowernumber, $biblio->biblionumber,
632
        $bibitems,  $priority, $resdate, $expdate, $notes,
633
        'a title', $item_4->itemnumber, $found
634
    );
635
    ( $renewokay, $error ) = CanBookBeRenewed( $renewing_borrowernumber, $item_4->itemnumber );
636
    is( $renewokay, 0, 'Still should not be able to renew' );
637
    is( $error, 'auto_too_soon', 'returned code is auto_too_soon, reserve not checked' );
638
    ( $renewokay, $error ) = CanBookBeRenewed( $renewing_borrowernumber, $item_4->itemnumber, 1 );
639
    is( $renewokay, 0, 'Still should not be able to renew' );
640
    is( $error, 'on_reserve', 'returned code is on_reserve, auto_too_soon limit is overridden' );
641
642
630
643
631
    # Bug 7413
644
    # Bug 7413
632
    # Test premature manual renewal
645
    # Test premature manual renewal
633
- 

Return to bug 19014