Lines 2212-2218
subtest 'CanBookBeIssued | is_overdue' => sub {
Link Here
|
2212 |
}; |
2212 |
}; |
2213 |
|
2213 |
|
2214 |
subtest 'ItemsDeniedRenewal preference' => sub { |
2214 |
subtest 'ItemsDeniedRenewal preference' => sub { |
2215 |
plan tests => 16; |
2215 |
plan tests => 18; |
2216 |
|
2216 |
|
2217 |
t::lib::Mocks::mock_preference( 'ItemsDeniedRenewal', '' ); |
2217 |
t::lib::Mocks::mock_preference( 'ItemsDeniedRenewal', '' ); |
2218 |
|
2218 |
|
Lines 2289-2295
subtest 'ItemsDeniedRenewal preference' => sub {
Link Here
|
2289 |
is( $idr_mayrenew, 1, 'Renewal allowed when 1 rules not matched (withdrawn)' ); |
2289 |
is( $idr_mayrenew, 1, 'Renewal allowed when 1 rules not matched (withdrawn)' ); |
2290 |
is( $idr_error, undef, 'Renewal allowed when 1 rules not matched (withdrawn)' ); |
2290 |
is( $idr_error, undef, 'Renewal allowed when 1 rules not matched (withdrawn)' ); |
2291 |
|
2291 |
|
2292 |
$idr_rules="withdrawn: [1]\ntype: [HIDE,INVISILE]"; |
2292 |
$idr_rules="withdrawn: [1]\nitype: [HIDE,INVISIBLE]"; |
2293 |
|
2293 |
|
2294 |
t::lib::Mocks::mock_preference( 'ItemsDeniedRenewal', $idr_rules ); |
2294 |
t::lib::Mocks::mock_preference( 'ItemsDeniedRenewal', $idr_rules ); |
2295 |
( $idr_mayrenew, $idr_error ) = |
2295 |
( $idr_mayrenew, $idr_error ) = |
Lines 2318-2324
subtest 'ItemsDeniedRenewal preference' => sub {
Link Here
|
2318 |
( $idr_mayrenew, $idr_error ) = |
2318 |
( $idr_mayrenew, $idr_error ) = |
2319 |
CanBookBeRenewed( $idr_borrower->borrowernumber, $deny_issue->itemnumber ); |
2319 |
CanBookBeRenewed( $idr_borrower->borrowernumber, $deny_issue->itemnumber ); |
2320 |
is( $idr_mayrenew, 0, 'Renewal blocked for undef when NULL in pref' ); |
2320 |
is( $idr_mayrenew, 0, 'Renewal blocked for undef when NULL in pref' ); |
|
|
2321 |
$idr_rules="itemcallnumber: ['']"; |
2322 |
t::lib::Mocks::mock_preference( 'ItemsDeniedRenewal', $idr_rules ); |
2323 |
( $idr_mayrenew, $idr_error ) = |
2324 |
CanBookBeRenewed( $idr_borrower->borrowernumber, $deny_issue->itemnumber ); |
2325 |
is( $idr_mayrenew, 1, 'Renewal not blocked for undef when "" in pref' ); |
2321 |
|
2326 |
|
|
|
2327 |
$idr_rules="itemnotes: [NULL]"; |
2328 |
t::lib::Mocks::mock_preference( 'ItemsDeniedRenewal', $idr_rules ); |
2329 |
( $idr_mayrenew, $idr_error ) = |
2330 |
CanBookBeRenewed( $idr_borrower->borrowernumber, $deny_issue->itemnumber ); |
2331 |
is( $idr_mayrenew, 1, 'Renewal not blocked for "" when NULL in pref' ); |
2322 |
$idr_rules="itemnotes: ['']"; |
2332 |
$idr_rules="itemnotes: ['']"; |
2323 |
t::lib::Mocks::mock_preference( 'ItemsDeniedRenewal', $idr_rules ); |
2333 |
t::lib::Mocks::mock_preference( 'ItemsDeniedRenewal', $idr_rules ); |
2324 |
( $idr_mayrenew, $idr_error ) = |
2334 |
( $idr_mayrenew, $idr_error ) = |
2325 |
- |
|
|