|
Lines 3846-3852
subtest 'effective_not_for_loan_status() tests' => sub {
Link Here
|
| 3846 |
|
3846 |
|
| 3847 |
subtest 'effective_bookable() tests' => sub { |
3847 |
subtest 'effective_bookable() tests' => sub { |
| 3848 |
|
3848 |
|
| 3849 |
plan tests => 5; |
3849 |
plan tests => 7; |
| 3850 |
|
3850 |
|
| 3851 |
$schema->storage->txn_begin; |
3851 |
$schema->storage->txn_begin; |
| 3852 |
|
3852 |
|
|
Lines 3897-3901
subtest 'effective_bookable() tests' => sub {
Link Here
|
| 3897 |
'->effective_bookable returns item specific bookable value when item bookable is defined' |
3897 |
'->effective_bookable returns item specific bookable value when item bookable is defined' |
| 3898 |
); |
3898 |
); |
| 3899 |
|
3899 |
|
|
|
3900 |
my $biblio_no_itype = $builder->build_sample_biblio; |
| 3901 |
$biblio_no_itype->biblioitem->set({ itemtype => undef })->store; |
| 3902 |
my $item_no_itype = $builder->build_sample_item({ |
| 3903 |
biblionumber => $biblio_no_itype->biblionumber, |
| 3904 |
itype => undef, |
| 3905 |
}); |
| 3906 |
warning_like { |
| 3907 |
is( |
| 3908 |
$item_no_itype->effective_bookable, 0, |
| 3909 |
'->effective_bookable returns 0 when item has no itemtype and item bookable is undefined' |
| 3910 |
); |
| 3911 |
} |
| 3912 |
qr/item-level_itypes set but no itemtype set for item/, |
| 3913 |
'Warning raised for missing itemtype when item-level_itypes is set'; |
| 3914 |
|
| 3900 |
$schema->storage->txn_rollback; |
3915 |
$schema->storage->txn_rollback; |
| 3901 |
}; |
3916 |
}; |
| 3902 |
- |
|
|