Lines 734-739
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
734 |
is( $renewokay, 1, '(Bug 8236), Can renew, this item is overdue but not pref does not block'); |
734 |
is( $renewokay, 1, '(Bug 8236), Can renew, this item is overdue but not pref does not block'); |
735 |
|
735 |
|
736 |
t::lib::Mocks::mock_preference('OverduesBlockRenewing','block'); |
736 |
t::lib::Mocks::mock_preference('OverduesBlockRenewing','block'); |
|
|
737 |
# Clear cache after changing preference affecting has_overdues evaluation |
738 |
$renewing_borrower_obj->_method_cache_clear('has_overdues'); |
739 |
|
737 |
( $renewokay, $error ) = CanBookBeRenewed($renewing_borrower_obj, $issue_6); |
740 |
( $renewokay, $error ) = CanBookBeRenewed($renewing_borrower_obj, $issue_6); |
738 |
is( $renewokay, 0, '(Bug 8236), Cannot renew, this item is not overdue but patron has overdues'); |
741 |
is( $renewokay, 0, '(Bug 8236), Cannot renew, this item is not overdue but patron has overdues'); |
739 |
is( $error, 'overdue', "Correct error returned"); |
742 |
is( $error, 'overdue', "Correct error returned"); |
Lines 742-747
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
742 |
is( $error, 'overdue', "Correct error returned"); |
745 |
is( $error, 'overdue', "Correct error returned"); |
743 |
|
746 |
|
744 |
t::lib::Mocks::mock_preference('OverduesBlockRenewing','blockitem'); |
747 |
t::lib::Mocks::mock_preference('OverduesBlockRenewing','blockitem'); |
|
|
748 |
# Clear cache after changing preference affecting has_overdues evaluation |
749 |
$renewing_borrower_obj->_method_cache_clear('has_overdues'); |
750 |
|
745 |
( $renewokay, $error ) = CanBookBeRenewed($renewing_borrower_obj, $issue_6); |
751 |
( $renewokay, $error ) = CanBookBeRenewed($renewing_borrower_obj, $issue_6); |
746 |
is( $renewokay, 1, '(Bug 8236), Can renew, this item is not overdue'); |
752 |
is( $renewokay, 1, '(Bug 8236), Can renew, this item is not overdue'); |
747 |
( $renewokay, $error ) = CanBookBeRenewed($renewing_borrower_obj, $issue_7); |
753 |
( $renewokay, $error ) = CanBookBeRenewed($renewing_borrower_obj, $issue_7); |
Lines 1726-1731
subtest "GetUpcomingDueIssues" => sub {
Link Here
|
1726 |
|
1732 |
|
1727 |
my $issue = AddIssue( $a_borrower, $item_1->barcode, $yesterday ); |
1733 |
my $issue = AddIssue( $a_borrower, $item_1->barcode, $yesterday ); |
1728 |
my $datedue = dt_from_string( $issue->date_due() ); |
1734 |
my $datedue = dt_from_string( $issue->date_due() ); |
|
|
1735 |
|
1729 |
my $issue_2 = AddIssue( $a_borrower, $item_2->barcode, $two_days_ahead ); |
1736 |
my $issue_2 = AddIssue( $a_borrower, $item_2->barcode, $two_days_ahead ); |
1730 |
my $datedue2 = dt_from_string( $issue->date_due() ); |
1737 |
my $datedue2 = dt_from_string( $issue->date_due() ); |
1731 |
|
1738 |
|
1732 |
- |
|
|