From 2d55e2cc5a3f23dcda1395c8ded340caf69c657c Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 30 Jan 2023 17:27:53 +0000 Subject: [PATCH] Bug 31095: (Rebase follow-up) Correct fine rules and AddIssue calls This patch corrects the errant call to AddIssue that passes a patron object instread of a patron hash to AddIssue in the tests and also adds lengthunit to squash a pair of warnings. However, it doesn't resolve the failing test.. still somthing going on there. --- t/db_dependent/Circulation.t | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t index 84389d60069..d57c63d8958 100755 --- a/t/db_dependent/Circulation.t +++ b/t/db_dependent/Circulation.t @@ -2856,9 +2856,10 @@ subtest 'AddReturn + suspension_chargeperiod' => sub { categorycode => undef, itemtype => undef, branchcode => undef, - rules => { - finedays => 0, - } + rules => { + finedays => 0, + lengthunit => 'days', + } } ); @@ -2870,7 +2871,7 @@ subtest 'AddReturn + suspension_chargeperiod' => sub { } ); - AddIssue( $patron, $item_1->barcode, $now->clone->subtract( days => 1 ) ); + AddIssue( $patron->unblessed, $item_1->barcode, $now->clone->subtract( days => 1 ) ); my ( undef, $message ) = AddReturn( $item_1->barcode, $library->{branchcode}, undef, $now ); is( $message->{WasReturned} && exists $message->{ForeverDebarred}, 1, 'Forever debarred message for Addreturn when overdue'); @@ -2888,7 +2889,7 @@ subtest 'AddReturn + suspension_chargeperiod' => sub { } ); - AddIssue( $patron, $item_1->barcode, $now->clone->subtract( days => 1 ) ); + AddIssue( $patron->unblessed, $item_1->barcode, $now->clone->subtract( days => 1 ) ); (undef, $message) = AddReturn( $item_1->barcode, $library->{branchcode}, undef, $now ); is( $message->{WasReturned} && exists $message->{PrevDebarred}, 1, 'Previously debarred message for Addreturn when overdue'); }; -- 2.39.1