Lines 23-28
use utf8;
Link Here
|
23 |
use Test::More tests => 38; |
23 |
use Test::More tests => 38; |
24 |
use Test::Exception; |
24 |
use Test::Exception; |
25 |
use Test::MockModule; |
25 |
use Test::MockModule; |
|
|
26 |
use Test::Warn; |
26 |
|
27 |
|
27 |
use C4::Biblio qw( GetMarcSubfieldStructure ); |
28 |
use C4::Biblio qw( GetMarcSubfieldStructure ); |
28 |
use C4::Circulation qw( AddIssue AddReturn ); |
29 |
use C4::Circulation qw( AddIssue AddReturn ); |
Lines 410-416
subtest 'remove_from_bundle tests' => sub {
Link Here
|
410 |
|
411 |
|
411 |
subtest 'hidden_in_opac() tests' => sub { |
412 |
subtest 'hidden_in_opac() tests' => sub { |
412 |
|
413 |
|
413 |
plan tests => 4; |
414 |
plan tests => 5; |
414 |
|
415 |
|
415 |
$schema->storage->txn_begin; |
416 |
$schema->storage->txn_begin; |
416 |
|
417 |
|
Lines 435-441
subtest 'hidden_in_opac() tests' => sub {
Link Here
|
435 |
|
436 |
|
436 |
ok( $item->hidden_in_opac({ rules => $rules }), 'Rule matching itype passed, should hide' ); |
437 |
ok( $item->hidden_in_opac({ rules => $rules }), 'Rule matching itype passed, should hide' ); |
437 |
|
438 |
|
438 |
|
439 |
$rules = { ccode => [ 'FOO' ] }; |
|
|
440 |
$item = $item->ccode(undef)->store->get_from_storage; |
441 |
warning_is { |
442 |
$item->hidden_in_opac({ rules => $rules }) } undef, 'No warning from hidden_in_opac'; |
439 |
|
443 |
|
440 |
$schema->storage->txn_rollback; |
444 |
$schema->storage->txn_rollback; |
441 |
}; |
445 |
}; |
442 |
- |
|
|