|
Lines 17-23
Link Here
|
| 17 |
|
17 |
|
| 18 |
use Modern::Perl; |
18 |
use Modern::Perl; |
| 19 |
|
19 |
|
| 20 |
use Test::More tests => 118; |
20 |
use Test::More tests => 119; |
| 21 |
|
21 |
|
| 22 |
use Data::Dumper; |
22 |
use Data::Dumper; |
| 23 |
use DateTime; |
23 |
use DateTime; |
|
Lines 2358-2363
subtest 'CanBookBeIssued | notforloan' => sub {
Link Here
|
| 2358 |
# TODO test with AllowNotForLoanOverride = 1 |
2358 |
# TODO test with AllowNotForLoanOverride = 1 |
| 2359 |
}; |
2359 |
}; |
| 2360 |
|
2360 |
|
|
|
2361 |
subtest 'AddReturn should clear items.onloan for unissued items' => sub { |
| 2362 |
plan tests => 1; |
| 2363 |
|
| 2364 |
t::lib::Mocks::mock_preference( "AllowReturnToBranch", 'anywhere' ); |
| 2365 |
my $item = $builder->build_object({ class => 'Koha::Items', value => { onloan => '2018-01-01' }}); |
| 2366 |
AddReturn( $item->barcode, $item->homebranch ); |
| 2367 |
$item->discard_changes; # refresh |
| 2368 |
is( $item->onloan, undef, 'AddReturn did clear items.onloan' ); |
| 2369 |
}; |
| 2370 |
|
| 2361 |
$schema->storage->txn_rollback; |
2371 |
$schema->storage->txn_rollback; |
| 2362 |
$cache->clear_from_cache('single_holidays'); |
2372 |
$cache->clear_from_cache('single_holidays'); |
| 2363 |
|
2373 |
|
| 2364 |
- |
|
|