@@ -, +, @@ --- t/db_dependent/Koha/Biblio.t | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- a/t/db_dependent/Koha/Biblio.t +++ a/t/db_dependent/Koha/Biblio.t @@ -62,7 +62,7 @@ subtest 'metadata() tests' => sub { subtest 'hidden_in_opac() tests' => sub { - plan tests => 3; + plan tests => 4; $schema->storage->txn_begin; @@ -85,6 +85,9 @@ subtest 'hidden_in_opac() tests' => sub { ok( $biblio->hidden_in_opac({ rules => { withdrawn => [ 2 ] } }), 'Biblio hidden' ); + my $biblio_without_items = $builder->build_sample_biblio(); + ok( !$biblio->hidden_in_opac({ rules => { withdrawn => [ 2 ] } }), 'Biblio without items is not hidden' ); + $schema->storage->txn_rollback; }; --