Bug 8684: Add regression tests for SearchItemsByField
Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
fa5104a6a1
commit
2eded5f165
|
|
@ -228,7 +228,7 @@ subtest q{Test Koha::Database->schema()->resultset('Item')->itemtype()} => sub {
|
|||
};
|
||||
|
||||
subtest 'SearchItems test' => sub {
|
||||
plan tests => 13;
|
||||
plan tests => 14;
|
||||
|
||||
# Start transaction
|
||||
$dbh->{AutoCommit} = 0;
|
||||
|
|
@ -383,6 +383,9 @@ subtest 'SearchItems test' => sub {
|
|||
($items, $total_results) = SearchItems($filter);
|
||||
ok(scalar @$items == 1, 'found 1 item with itemnotes = "foobar"');
|
||||
|
||||
my $cpl_items = SearchItemsByField( 'homebranch', 'CPL');
|
||||
is( ( $cpl_items and scalar( @$cpl_items ) ), 1, 'SearchItemsByField should return something' );
|
||||
|
||||
$dbh->rollback;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue