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

(-)a/t/db_dependent/Circulation.t (-3 / +2 lines)
Lines 800-806 subtest "CanBookBeRenewed tests" => sub { Link Here
800
    is( $renewokay, 0, 'Bug 14101: Cannot renew, renewal is automatic and premature' );
800
    is( $renewokay, 0, 'Bug 14101: Cannot renew, renewal is automatic and premature' );
801
    is( $error, 'auto_too_soon',
801
    is( $error, 'auto_too_soon',
802
        'Bug 14101: Cannot renew, renewal is automatic and premature, "No renewal before" = undef (returned code is auto_too_soon)' );
802
        'Bug 14101: Cannot renew, renewal is automatic and premature, "No renewal before" = undef (returned code is auto_too_soon)' );
803
    is( $info->{soonest_renew_date} , $issue->date_due, "Due date is returned as earliest renewal date when error is 'auto_too_soon'" );
803
    is( $info->{soonest_renew_date} , dt_from_string($issue->date_due), "Due date is returned as earliest renewal date when error is 'auto_too_soon'" );
804
    AddReserve(
804
    AddReserve(
805
        {
805
        {
806
            branchcode       => $branch,
806
            branchcode       => $branch,
Lines 822-828 subtest "CanBookBeRenewed tests" => sub { Link Here
822
    ( $renewokay, $error, $info ) = CanBookBeRenewed( $renewing_borrowernumber, $item_4->itemnumber, undef, 1 );
822
    ( $renewokay, $error, $info ) = CanBookBeRenewed( $renewing_borrowernumber, $item_4->itemnumber, undef, 1 );
823
    is( $renewokay, 0, 'Still should not be able to renew' );
823
    is( $renewokay, 0, 'Still should not be able to renew' );
824
    is( $error, 'auto_too_soon', 'returned code is auto_too_soon, reserve not checked when checking for cron' );
824
    is( $error, 'auto_too_soon', 'returned code is auto_too_soon, reserve not checked when checking for cron' );
825
    is( $info->{soonest_renew_date}, $issue->date_due, "Due date is returned as earliest renewal date when error is 'auto_too_soon'" );
825
    is( $info->{soonest_renew_date}, dt_from_string($issue->date_due), "Due date is returned as earliest renewal date when error is 'auto_too_soon'" );
826
    ( $renewokay, $error ) = CanBookBeRenewed( $renewing_borrowernumber, $item_4->itemnumber, 1 );
826
    ( $renewokay, $error ) = CanBookBeRenewed( $renewing_borrowernumber, $item_4->itemnumber, 1 );
827
    is( $renewokay, 0, 'Still should not be able to renew' );
827
    is( $renewokay, 0, 'Still should not be able to renew' );
828
    is( $error, 'on_reserve', 'returned code is on_reserve, auto_too_soon limit is overridden' );
828
    is( $error, 'on_reserve', 'returned code is on_reserve, auto_too_soon limit is overridden' );
829
- 

Return to bug 30167