Lines 385-391
subtest 'SearchItems test' => sub {
Link Here
|
385 |
}); |
385 |
}); |
386 |
|
386 |
|
387 |
t::lib::Mocks::mock_preference('marcflavour', 'MARC21'); |
387 |
t::lib::Mocks::mock_preference('marcflavour', 'MARC21'); |
388 |
my $cpl_items_before = SearchItemsByField( 'homebranch', $library1->{branchcode}); |
388 |
my ($cpl_items_before) = SearchItems( { field => 'homebranch', query => $library1->{branchcode} } ); |
389 |
|
389 |
|
390 |
my $biblio = $builder->build_sample_biblio({ title => 'Silence in the library' }); |
390 |
my $biblio = $builder->build_sample_biblio({ title => 'Silence in the library' }); |
391 |
$builder->build_sample_biblio({ title => 'Silence in the shadow' }); |
391 |
$builder->build_sample_biblio({ title => 'Silence in the shadow' }); |
Lines 541-548
subtest 'SearchItems test' => sub {
Link Here
|
541 |
($items, $total_results) = SearchItems($filter); |
541 |
($items, $total_results) = SearchItems($filter); |
542 |
ok(scalar @$items == 1, 'found 1 item with itemnotes = "foobar"'); |
542 |
ok(scalar @$items == 1, 'found 1 item with itemnotes = "foobar"'); |
543 |
|
543 |
|
544 |
my $cpl_items_after = SearchItemsByField( 'homebranch', $library1->{branchcode}); |
544 |
my ($cpl_items_after) = SearchItems( { field => 'homebranch', query => $library1->{branchcode} } ); |
545 |
is( ( scalar( @$cpl_items_after ) - scalar ( @$cpl_items_before ) ), 1, 'SearchItemsByField should return something' ); |
545 |
is( ( scalar( @$cpl_items_after ) - scalar ( @$cpl_items_before ) ), 1, 'SearchItems should return something' ); |
546 |
|
546 |
|
547 |
# Issues count may be NULL |
547 |
# Issues count may be NULL |
548 |
$filter = { |
548 |
$filter = { |
549 |
- |
|
|