Bug 12134: Add unit tests to reflect the change in IsDebarred

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This commit is contained in:
Jonathan Druart 2014-04-24 17:36:44 +02:00 committed by Galen Charlton
parent 40378d4a13
commit 9f1f7da8ac

View file

@ -5,7 +5,7 @@ use Modern::Perl;
use C4::Context;
use C4::Members;
use Test::More tests => 18;
use Test::More tests => 19;
use_ok('Koha::Borrower::Debarments');
@ -93,4 +93,7 @@ foreach my $d ( @$debarments ) {
$debarments = GetDebarments({ borrowernumber => $borrowernumber });
ok( @$debarments == 0, "DelDebarment functions correctly" );
$dbh->do(q|UPDATE borrowers SET debarred = '1970-01-01'|);
is( IsDebarred( $borrowernumber ), undef, 'A patron with a debarred date in the past is not debarred' );
$dbh->rollback;