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

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

Return to bug 19014