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:
parent
40378d4a13
commit
9f1f7da8ac
1 changed files with 4 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue