Lines 611-617
subtest 'SearchItems test' => sub {
Link Here
|
611 |
my ($cpl_items_after) = SearchItems( { field => 'homebranch', query => $library1->{branchcode} } ); |
611 |
my ($cpl_items_after) = SearchItems( { field => 'homebranch', query => $library1->{branchcode} } ); |
612 |
is( ( scalar( @$cpl_items_after ) - scalar ( @$cpl_items_before ) ), 1, 'SearchItems should return something' ); |
612 |
is( ( scalar( @$cpl_items_after ) - scalar ( @$cpl_items_before ) ), 1, 'SearchItems should return something' ); |
613 |
|
613 |
|
614 |
# Issues count may be NULL |
614 |
# Issues count = 0 |
615 |
$filter = { |
615 |
$filter = { |
616 |
conjunction => 'AND', |
616 |
conjunction => 'AND', |
617 |
filters => [ |
617 |
filters => [ |
Lines 628-634
subtest 'SearchItems test' => sub {
Link Here
|
628 |
], |
628 |
], |
629 |
}; |
629 |
}; |
630 |
($items, $total_results) = SearchItems($filter); |
630 |
($items, $total_results) = SearchItems($filter); |
631 |
is($total_results, 1, "Search items.issues is NULL with filter issues = 0"); |
631 |
is($total_results, 1, "Search items.issues issues = 0 returns result (items.issues defaults to 0)"); |
632 |
|
632 |
|
633 |
$schema->storage->txn_rollback; |
633 |
$schema->storage->txn_rollback; |
634 |
}; |
634 |
}; |
635 |
- |
|
|