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