From d32a483c3e38e93027c8c8c460dd7eda28f87805 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 25 Aug 2022 09:23:36 +0100 Subject: [PATCH] Bug 31095: Remove GetDebarments from Restriction/Type.t This patch replaces GetDebarments with $patron->restrictions in t/db_dependent/Koha/Patron/Restriction/Type.t Test plan 1. Confirm t/db_dependent/Koha/Patron/Restriction/Type.t passes prior to the patch 2. Confirm t/db_dependent/Koha/Patron/Restriction/Type.t passes after the patch 3. Confirm no tests were removed --- t/db_dependent/Koha/Patron/Restriction/Type.t | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/t/db_dependent/Koha/Patron/Restriction/Type.t b/t/db_dependent/Koha/Patron/Restriction/Type.t index 850f734520..1caae5d873 100755 --- a/t/db_dependent/Koha/Patron/Restriction/Type.t +++ b/t/db_dependent/Koha/Patron/Restriction/Type.t @@ -81,13 +81,10 @@ subtest 'delete() tests' => sub { } ); ok( $used_restriction_type->delete, 'Used restriction type deleted' ); - my $debarments = Koha::Patron::Debarments::GetDebarments( - { - borrowernumber => $patron->borrowernumber - } - ); + my $restrictions = $patron->restrictions; + my $THE_restriction = $restrictions->next; is( - $debarments->[0]->{type}, + $THE_restriction->type->code, $default_restriction_type->code, 'Used restriction updated to default' ); -- 2.20.1