Bug 11229: Make the tests pass even if issues exist in the DB
[koha-ffzg.git] / t / db_dependent / ILSDI_Services.t
index 2e4f933..9aee73e 100644 (file)
@@ -4,7 +4,7 @@ use Modern::Perl;
 
 use C4::Members qw/AddMember GetMember GetBorrowercategory/;
 use C4::Branch;
-use CGI;
+use CGI qw ( -utf8 );
 
 use Test::More tests => 15;
 
@@ -32,13 +32,13 @@ my %data = (
 # 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');");
 }
 
@@ -72,7 +72,6 @@ my $borrower = GetMember( borrowernumber => $borrowernumber );
     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");
@@ -88,6 +87,6 @@ TODO: { local: $TODO = "Can't use cardnumber for authentication with ILS-DI yet.
     $reply = C4::ILSDI::Services::AuthenticatePatron($query);
     is($reply->{'code'}, 'PatronNotFound', "non-existing cardnumer/userid - PatronNotFound");
     is($reply->{'id'}, undef, "id undef");
-    }
 
 }
+