Bug 23225: Add a test

Signed-off-by: Luis F. Lopez <lflfalagan@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Jonathan Druart 2019-06-28 14:00:53 -05:00 committed by Martin Renvoize
parent bb80b2d38b
commit f5d3dec2e4
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 4 additions and 1 deletions

View File

@ -62,11 +62,14 @@ subtest 'metadata() tests' => sub {
subtest 'hidden_in_opac() tests' => sub {
plan tests => 3;
plan tests => 4;
$schema->storage->txn_begin;
my $biblio = $builder->build_sample_biblio();
ok( !$biblio->hidden_in_opac({ rules => { withdrawn => [ 2 ] } }), 'Biblio not hidden if there is no item attached' );
my $item_1 = $builder->build_sample_item({ biblionumber => $biblio->biblionumber });
my $item_2 = $builder->build_sample_item({ biblionumber => $biblio->biblionumber });