|
Lines 1350-1356
subtest 'get_marc_notes() UNIMARC tests' => sub {
Link Here
|
| 1350 |
}; |
1350 |
}; |
| 1351 |
|
1351 |
|
| 1352 |
subtest 'host_items() tests' => sub { |
1352 |
subtest 'host_items() tests' => sub { |
| 1353 |
plan tests => 7; |
1353 |
plan tests => 8; |
| 1354 |
|
1354 |
|
| 1355 |
$schema->storage->txn_begin; |
1355 |
$schema->storage->txn_begin; |
| 1356 |
|
1356 |
|
|
Lines 1381-1386
subtest 'host_items() tests' => sub {
Link Here
|
| 1381 |
is_deeply( [ $host_items->get_column('itemnumber') ], |
1381 |
is_deeply( [ $host_items->get_column('itemnumber') ], |
| 1382 |
[ $host_item_1->itemnumber, $host_item_2->itemnumber ] ); |
1382 |
[ $host_item_1->itemnumber, $host_item_2->itemnumber ] ); |
| 1383 |
|
1383 |
|
|
|
1384 |
my $transfer = $builder->build_object( |
| 1385 |
{ |
| 1386 |
class => 'Koha::Item::Transfers', |
| 1387 |
value => { |
| 1388 |
itemnumber => $host_item_1->itemnumber, |
| 1389 |
frombranch => $host_item_1->holdingbranch, |
| 1390 |
} |
| 1391 |
} |
| 1392 |
); |
| 1393 |
ok( |
| 1394 |
$host_items->search( |
| 1395 |
{}, |
| 1396 |
{ |
| 1397 |
join => 'branchtransfers', |
| 1398 |
order_by => 'branchtransfers.daterequested' |
| 1399 |
} |
| 1400 |
)->as_list, |
| 1401 |
"host_items can be used with a join query on itemnumber" |
| 1402 |
); |
| 1403 |
$transfer->delete; |
| 1404 |
|
| 1384 |
t::lib::Mocks::mock_preference( 'EasyAnalyticalRecords', 0 ); |
1405 |
t::lib::Mocks::mock_preference( 'EasyAnalyticalRecords', 0 ); |
| 1385 |
$host_items = $biblio->host_items; |
1406 |
$host_items = $biblio->host_items; |
| 1386 |
is( ref($host_items), 'Koha::Items' ); |
1407 |
is( ref($host_items), 'Koha::Items' ); |
| 1387 |
- |
|
|