|
Lines 1535-1541
$schema->storage->txn_rollback;
Link Here
|
| 1535 |
|
1535 |
|
| 1536 |
subtest 'filter_by_visible_in_opac() tests' => sub { |
1536 |
subtest 'filter_by_visible_in_opac() tests' => sub { |
| 1537 |
|
1537 |
|
| 1538 |
plan tests => 12; |
1538 |
plan tests => 14; |
| 1539 |
|
1539 |
|
| 1540 |
$schema->storage->txn_begin; |
1540 |
$schema->storage->txn_begin; |
| 1541 |
|
1541 |
|
|
Lines 1688-1693
subtest 'filter_by_visible_in_opac() tests' => sub {
Link Here
|
| 1688 |
my @warnings = C4::Context->dbh->selectrow_array('SHOW WARNINGS'); |
1688 |
my @warnings = C4::Context->dbh->selectrow_array('SHOW WARNINGS'); |
| 1689 |
is( $warnings[2], q{Truncated incorrect DOUBLE value: 'AB'}); |
1689 |
is( $warnings[2], q{Truncated incorrect DOUBLE value: 'AB'}); |
| 1690 |
|
1690 |
|
|
|
1691 |
$rules = { itype => [ $itype_1->itemtype ], copynumber => [ 2 ] }; |
| 1692 |
my @items = $biblio->items->filter_by_visible_in_opac; |
| 1693 |
is( |
| 1694 |
scalar @items, |
| 1695 |
2, |
| 1696 |
'filter_by_visible_in_opac honours list context' |
| 1697 |
); |
| 1698 |
is( ref($items[0]), 'Koha::Item', 'Returns a list of Koha::Item objects' ); |
| 1699 |
|
| 1691 |
$schema->storage->txn_rollback; |
1700 |
$schema->storage->txn_rollback; |
| 1692 |
}; |
1701 |
}; |
| 1693 |
|
1702 |
|
| 1694 |
- |
|
|