|
Lines 17-23
Link Here
|
| 17 |
|
17 |
|
| 18 |
use Modern::Perl; |
18 |
use Modern::Perl; |
| 19 |
|
19 |
|
| 20 |
use Test::More tests => 117; |
20 |
use Test::More tests => 118; |
| 21 |
|
21 |
|
| 22 |
use DateTime; |
22 |
use DateTime; |
| 23 |
use POSIX qw( floor ); |
23 |
use POSIX qw( floor ); |
|
Lines 2227-2232
subtest 'CanBookBeIssued | item-level_itypes=biblio' => sub {
Link Here
|
| 2227 |
is_deeply( $issuingimpossible, {}, 'Item can be issued to this patron' ); |
2227 |
is_deeply( $issuingimpossible, {}, 'Item can be issued to this patron' ); |
| 2228 |
}; |
2228 |
}; |
| 2229 |
|
2229 |
|
|
|
2230 |
subtest 'AddReturn should clear items.onloan for unissued items' => sub { |
| 2231 |
plan tests => 1; |
| 2232 |
|
| 2233 |
t::lib::Mocks::mock_preference( "AllowReturnToBranch", 'anywhere' ); |
| 2234 |
my $item = $builder->build_object({ class => 'Koha::Items', value => { onloan => '2018-01-01' }}); |
| 2235 |
AddReturn( $item->barcode, $item->homebranch ); |
| 2236 |
$item->discard_changes; # refresh |
| 2237 |
is( $item->onloan, undef, 'AddReturn did clear items.onloan' ); |
| 2238 |
}; |
| 2239 |
|
| 2230 |
$schema->storage->txn_rollback; |
2240 |
$schema->storage->txn_rollback; |
| 2231 |
$cache->clear_from_cache('single_holidays'); |
2241 |
$cache->clear_from_cache('single_holidays'); |
| 2232 |
|
2242 |
|
| 2233 |
- |
|
|