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:
Jonathan Druart 2015-04-13 10:12:03 +02:00 committed by Tomas Cohen Arazi
parent fa5104a6a1
commit 2eded5f165
1 changed files with 4 additions and 1 deletions

View File

@ -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;
};