|
Lines 439-445
subtest 'SearchItems test' => sub {
Link Here
|
| 439 |
}); |
439 |
}); |
| 440 |
|
440 |
|
| 441 |
t::lib::Mocks::mock_preference('marcflavour', 'MARC21'); |
441 |
t::lib::Mocks::mock_preference('marcflavour', 'MARC21'); |
| 442 |
my $cpl_items_before = SearchItemsByField( 'homebranch', $library1->{branchcode}); |
442 |
my ($cpl_items_before) = SearchItems( { field => 'homebranch', query => $library1->{branchcode} } ); |
| 443 |
|
443 |
|
| 444 |
my $biblio = $builder->build_sample_biblio({ title => 'Silence in the library' }); |
444 |
my $biblio = $builder->build_sample_biblio({ title => 'Silence in the library' }); |
| 445 |
$builder->build_sample_biblio({ title => 'Silence in the shadow' }); |
445 |
$builder->build_sample_biblio({ title => 'Silence in the shadow' }); |
|
Lines 595-602
subtest 'SearchItems test' => sub {
Link Here
|
| 595 |
($items, $total_results) = SearchItems($filter); |
595 |
($items, $total_results) = SearchItems($filter); |
| 596 |
ok(scalar @$items == 1, 'found 1 item with itemnotes = "foobar"'); |
596 |
ok(scalar @$items == 1, 'found 1 item with itemnotes = "foobar"'); |
| 597 |
|
597 |
|
| 598 |
my $cpl_items_after = SearchItemsByField( 'homebranch', $library1->{branchcode}); |
598 |
my ($cpl_items_after) = SearchItems( { field => 'homebranch', query => $library1->{branchcode} } ); |
| 599 |
is( ( scalar( @$cpl_items_after ) - scalar ( @$cpl_items_before ) ), 1, 'SearchItemsByField should return something' ); |
599 |
is( ( scalar( @$cpl_items_after ) - scalar ( @$cpl_items_before ) ), 1, 'SearchItems should return something' ); |
| 600 |
|
600 |
|
| 601 |
# Issues count may be NULL |
601 |
# Issues count may be NULL |
| 602 |
$filter = { |
602 |
$filter = { |
| 603 |
- |
|
|