Lines 17-23
Link Here
|
17 |
|
17 |
|
18 |
use Modern::Perl; |
18 |
use Modern::Perl; |
19 |
|
19 |
|
20 |
use Test::More tests => 3; |
20 |
use Test::More tests => 2; |
21 |
use Test::MockModule; |
21 |
use Test::MockModule; |
22 |
use Test::Warn; |
22 |
use Test::Warn; |
23 |
|
23 |
|
Lines 124-132
subtest "AddReturn logging on statistics table (item-level_itypes=1)" => sub {
Link Here
|
124 |
warning_like { AddIssue( $borrower, $item_without_itemtype->{ barcode } ) } |
124 |
warning_like { AddIssue( $borrower, $item_without_itemtype->{ barcode } ) } |
125 |
qr/^item-level_itypes set but no itemtype set for item/, |
125 |
qr/^item-level_itypes set but no itemtype set for item/, |
126 |
'Item without itemtype set raises warning on AddIssue'; |
126 |
'Item without itemtype set raises warning on AddIssue'; |
127 |
warning_like { AddReturn( $item_without_itemtype->{ barcode }, $branch ) } |
127 |
warnings_like { AddReturn( $item_without_itemtype->{ barcode }, $branch ) } |
128 |
qr/^item-level_itypes set but no itemtype set for item/, |
128 |
[qr/^item-level_itypes set but no itemtype set for item/,qr/^item-level_itypes set but no itemtype set for item/], |
129 |
'Item without itemtype set raises warning on AddReturn'; |
129 |
'Item without itemtype set raises warnings on AddReturn'; |
130 |
# Test biblio-level itemtype was recorded on the 'statistics' table |
130 |
# Test biblio-level itemtype was recorded on the 'statistics' table |
131 |
$stat = $schema->resultset('Statistic')->search({ |
131 |
$stat = $schema->resultset('Statistic')->search({ |
132 |
branch => $branch, |
132 |
branch => $branch, |
Lines 221-224
subtest "AddReturn logging on statistics table (item-level_itypes=0)" => sub {
Link Here
|
221 |
"biblio-level itype recorded on statistics for return"); |
221 |
"biblio-level itype recorded on statistics for return"); |
222 |
}; |
222 |
}; |
223 |
|
223 |
|
|
|
224 |
$schema->storage->txn_rollback; |
225 |
|
224 |
1; |
226 |
1; |
225 |
- |
|
|