use C4::Members qw/AddMember GetMember GetBorrowercategory/;
use C4::Branch;
-use CGI;
+use CGI qw ( -utf8 );
use Test::More tests => 15;
# Crate patron category
unless ( GetBorrowercategory('UT') ) {
$dbh->do("INSERT INTO categories
- (categorycode,description,enrolmentperiod,upperagelimit,enrolmentfee,overduenoticerequired,reservefee,category_type)
+ (categorycode,description,enrolmentperiod,upperagelimit,enrolmentfee,overduenoticerequired,reservefee,category_type,default_privacy)
VALUES
- ('UT','Unit tester',99,99,0.000000,1,0.000000,'C');");
+ ('UT','Unit tester',99,99,0.000000,1,0.000000,'C','default');");
}
# Create branch
-unless ( GetBranchDetail('DEMO') ) {
+unless ( GetBranchDetail('UT') ) {
$dbh->do("INSERT INTO branches (branchcode,branchname) VALUES ('UT','Unit test library');");
}
is($reply->{'id'}, $borrowernumber, "userid is not case sensitive - Patron authenticated");
is($reply->{'code'}, undef, "Error code undef");
-TODO: { local: $TODO = "Can't use cardnumber for authentication with ILS-DI yet.";
$query->param('username',$borrower->{'cardnumber'});
$reply = C4::ILSDI::Services::AuthenticatePatron($query);
is($reply->{'id'}, $borrowernumber, "cardnumber and password - Patron authenticated");
$reply = C4::ILSDI::Services::AuthenticatePatron($query);
is($reply->{'code'}, 'PatronNotFound', "non-existing cardnumer/userid - PatronNotFound");
is($reply->{'id'}, undef, "id undef");
- }
}
+