@@ -, +, @@ --- t/db_dependent/Circulation/issue.t | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) --- a/t/db_dependent/Circulation/issue.t +++ a/t/db_dependent/Circulation/issue.t @@ -462,11 +462,18 @@ AddReturn( 'barcode_3', $branchcode_1 ); $item = Koha::Items->find( $itemnumber ); ok( $item->notforloan eq 0, q{UpdateNotForLoanStatusOnCheckin _ALL_ rules are applied if there are no specific item type rule matching the returned item} ); -t::lib::Mocks::mock_preference( 'UpdateNotForLoanStatusOnCheckin', '1: ONLYMESSAGE' ); +t::lib::Mocks::mock_preference( + 'UpdateNotForLoanStatusOnCheckin', q{_ALL_: + 1: ONLYMESSAGE +} +); $item->notforloan(1)->store; AddReturn( 'barcode_3', $branchcode_1 ); -$item = Koha::Items->find( $itemnumber ); -ok( $item->notforloan eq 1, q{UpdateNotForLoanStatusOnCheckin does not update notforloan value from 1 with setting "1: ONLYMESSAGE"} ); +$item->discard_changes; +ok( + $item->notforloan eq 1, + q{UpdateNotForLoanStatusOnCheckin does not update notforloan value from 1 with setting "1: ONLYMESSAGE"} +); my $itemnumber2 = Koha::Item->new( { --