Bug 33844: Modify test to show problem

Add delete key.
Without the follow-up, this triggers a delete. Test fails.
DBIx::Class::Row::delete(): Not in database at /usr/share/koha/Koha/Object.pm line 234

Test plan:
Run t/db_dependent/Koha/Item.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Marcel de Rooy 2023-05-26 12:54:22 +00:00 committed by Tomas Cohen Arazi
parent 61e5bab673
commit 6264ecdad0
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
1 changed files with 2 additions and 1 deletions

View File

@ -2127,7 +2127,8 @@ subtest 'is_denied_renewal' => sub {
C4::Context->set_preference('ItemsDeniedRenewal', $idr_rules);
is( $deny_book->is_denied_renewal, 0, 'Renewal allowed when no rules' );
$idr_rules="withdrawn: [1]";
# The wrong column delete should be silently ignored and not trigger item delete
$idr_rules="delete: [yes]\nwithdrawn: [1]";
C4::Context->set_preference('ItemsDeniedRenewal', $idr_rules);
is( $deny_book->is_denied_renewal, 1, 'Renewal blocked when 1 rules (withdrawn)' );
is( $allow_book->is_denied_renewal, 0, 'Renewal allowed when 1 rules not matched (withdrawn)' );