Lines 92-98
subtest 'after_circ_action() hook tests' => sub {
Link Here
|
92 |
}; |
92 |
}; |
93 |
|
93 |
|
94 |
subtest 'AddReturn' => sub { |
94 |
subtest 'AddReturn' => sub { |
95 |
plan tests => 1; |
95 |
plan tests => 2; |
|
|
96 |
|
97 |
t::lib::Mocks::mock_preference('BlockReturnOfWithdrawnItems', 1); |
98 |
$item_1->set({ withdrawn => 1 })->store; |
99 |
|
100 |
warning_is { |
101 |
AddReturn( $item_1->barcode, $patron->branchcode ); |
102 |
} undef, 'No hook called because no return happened'; |
103 |
|
104 |
t::lib::Mocks::mock_preference('BlockReturnOfWithdrawnItems', 0); |
105 |
$item_1->set({ withdrawn => 0 })->store; |
96 |
|
106 |
|
97 |
warning_like { |
107 |
warning_like { |
98 |
AddReturn( $item_1->barcode, $patron->branchcode ); |
108 |
AddReturn( $item_1->barcode, $patron->branchcode ); |
99 |
- |
|
|