Bug 12134: (follow-up) fix one of the IsDebarred() tests
authorGalen Charlton <gmc@esilibrary.com>
Mon, 28 Apr 2014 17:05:19 +0000 (17:05 +0000)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 28 Apr 2014 17:08:00 +0000 (17:08 +0000)
- pass valid ISO date to the debar-date-in-future test
- correctly verify that patron is restricted

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
t/db_dependent/Borrower_Debarments.t

index cb71c57..44d82b9 100755 (executable)
@@ -99,7 +99,7 @@ is( IsDebarred( $borrowernumber ), undef, 'A patron with a debarred date in the
 $dbh->do(q|UPDATE borrowers SET debarred = NULL|);
 is( IsDebarred( $borrowernumber ), undef, 'A patron without a debarred date is not debarred' );
 
-$dbh->do(q|UPDATE borrowers SET debarred = '9999-31-12'|); # Note: Change this test before the first of January 10000!
-is( IsDebarred( $borrowernumber ), undef, 'A patron with a debarred date in the future is debarred' );
+$dbh->do(q|UPDATE borrowers SET debarred = '9999-12-31'|); # Note: Change this test before the first of January 10000!
+is( IsDebarred( $borrowernumber ), '9999-12-31', 'A patron with a debarred date in the future is debarred' );
 
 $dbh->rollback;