From d05d371588e78cb7cc33c6960ac4aefbf1d54b14 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Tue, 4 Jul 2023 07:07:05 +0100 Subject: [PATCH] Bug 23336: (follow-up) Fix failing test Our consistency improvement to the AddIssue return in bug 23336 highlighted a bad test assumption. The 'Reinsert the original issue' line was silently failing and as such the subsequent test lines were actually resulting in a renewal (which previous to this patchset returned an empty return that happened to match the empty return of an issue failure) --- t/db_dependent/Circulation.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t index 5c91fb195b..1b625f90e4 100755 --- a/t/db_dependent/Circulation.t +++ b/t/db_dependent/Circulation.t @@ -2104,7 +2104,7 @@ subtest 'AddIssue & AllowReturnToBranch' => sub { ## Can be issued from homebranch set_userenv($homebranch); is ( ref( AddIssue( $patron_2, $item->barcode ) ), $ref_issue, 'AllowReturnToBranch - homebranch | Can be issued from homebranch' ); - set_userenv($holdingbranch); AddIssue( $patron_1, $item->barcode ); # Reinsert the original issue + AddIssue( $patron_1, $item->barcode ); # Re-issue to patron 1 ## Cannot be issued from holdinbranch set_userenv($holdingbranch); is ( ref( AddIssue( $patron_2, $item->barcode ) ), '', 'AllowReturnToBranch - homebranch | Cannot be issued from holdingbranch' ); -- 2.41.0