From 712cca53eb4bddc23371c5696b8bf8652895006d Mon Sep 17 00:00:00 2001 From: Matthias Meusburger Date: Wed, 16 Sep 2015 14:54:13 +0200 Subject: [PATCH] Bug 14368 [Follow-up]: Fix tests. --- t/db_dependent/Borrower_Discharge.t | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/t/db_dependent/Borrower_Discharge.t b/t/db_dependent/Borrower_Discharge.t index 6a4b806..793283c 100644 --- a/t/db_dependent/Borrower_Discharge.t +++ b/t/db_dependent/Borrower_Discharge.t @@ -53,8 +53,9 @@ is(Koha::Borrower::Discharge::generate_as_pdf,undef,"Confirm failure when lackin Koha::Borrower::Discharge::discharge({ borrowernumber => $borrowernumber }); is( Koha::Borrower::Discharge::is_discharged({ borrowernumber => $borrowernumber }), 1, 'The patron has been discharged' ); is(Koha::Borrower::Debarments::IsDebarred($borrowernumber), '9999-12-31', 'The patron has been debarred after discharge'); -Koha::Borrower::Debarments::DelDebarment($borrowernumber); -is( Koha::Borrower::Discharge::is_discharged({ borrowernumber => $borrowernumber }), 1, 'The patron is not discharged after the restriction has been lifted' ); +Koha::Borrower::Debarments::DelUniqueDebarment({'borrowernumber' => $borrowernumber, 'type' => 'DISCHARGE'}); +ok(! Koha::Borrower::Debarments::IsDebarred($borrowernumber), 'The debarment has been lifted'); +ok(! Koha::Borrower::Discharge::is_discharged({ borrowernumber => $borrowernumber }), 'The patron is not discharged after the restriction has been lifted' ); # Check if PDF::FromHTML is installed. my $check = eval { require PDF::FromHTML; }; -- 1.7.10.4