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 Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
f35fb71977
commit
4a3a22f2b4
1 changed files with 3 additions and 6 deletions
|
@ -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'
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue