|
Lines 250-255
subtest 'SearchItems test' => sub {
Link Here
|
| 250 |
$dbh->{RaiseError} = 1; |
250 |
$dbh->{RaiseError} = 1; |
| 251 |
|
251 |
|
| 252 |
C4::Context->set_preference('marcflavour', 'MARC21'); |
252 |
C4::Context->set_preference('marcflavour', 'MARC21'); |
|
|
253 |
my $cpl_items_before = SearchItemsByField( 'homebranch', 'CPL'); |
| 254 |
|
| 253 |
my ($biblionumber) = get_biblio(); |
255 |
my ($biblionumber) = get_biblio(); |
| 254 |
|
256 |
|
| 255 |
# Add branches if they don't exist |
257 |
# Add branches if they don't exist |
|
Lines 398-405
subtest 'SearchItems test' => sub {
Link Here
|
| 398 |
($items, $total_results) = SearchItems($filter); |
400 |
($items, $total_results) = SearchItems($filter); |
| 399 |
ok(scalar @$items == 1, 'found 1 item with itemnotes = "foobar"'); |
401 |
ok(scalar @$items == 1, 'found 1 item with itemnotes = "foobar"'); |
| 400 |
|
402 |
|
| 401 |
my $cpl_items = SearchItemsByField( 'homebranch', 'CPL'); |
403 |
my $cpl_items_after = SearchItemsByField( 'homebranch', 'CPL'); |
| 402 |
is( ( $cpl_items and scalar( @$cpl_items ) ), 1, 'SearchItemsByField should return something' ); |
404 |
is( ( scalar( @$cpl_items_after ) - scalar ( @$cpl_items_before ) ), 1, 'SearchItemsByField should return something' ); |
| 403 |
|
405 |
|
| 404 |
$dbh->rollback; |
406 |
$dbh->rollback; |
| 405 |
}; |
407 |
}; |
| 406 |
- |
|
|