3 # This Koha test module is a stub!
4 # Add more tests here!!!
9 use Test
::More tests
=> 6;
12 use_ok
('C4::Auth', qw(checkpw));
13 use_ok
('C4::Context');
16 use vars
qw($dbh $ldap);
17 can_ok('C4::Context', 'config');
18 can_ok('C4::Context', 'dbh');
19 can_ok('C4::Auth', qw(checkpw));
20 ok
($dbh = C4
::Context
->dbh(), "Getting dbh from C4::Context");
21 $ldap = C4
::Context
->config('useldapserver') || 0;
22 diag
("Using LDAP? $ldap");
24 while (1) { # forever!
25 print "Do you want to test further accounts? (If not, just hit return.)\n";
27 print "Enter username: ";
30 print "Enter password: ";
32 my ($retval,$retcard) = checkpw
($dbh,$user,$pass);
35 diag
("checkpw(\$dbh,$user,$pass) " . ($retval ?
'SUCCEEDS' : ' FAILS ') . "\treturns ($retval,$retcard)");
39 diag
("C4::Auth - end of test");