Bug 6254: (follow-up) work-around to fix a failing test case
authorGalen Charlton <gmc@esilibrary.com>
Mon, 26 May 2014 04:19:19 +0000 (04:19 +0000)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 26 May 2014 04:19:19 +0000 (04:19 +0000)
This patch ensures that a patron category that is present
in the (English) sample data is used for the ILS-DI tests,
avoiding a situation where one part of AddMember was trying
to access a patron category via DBIC but failed because
it was not visible to it yet.

Note that this will become easier once C4::Context->dbh
and DBIC are using the same base DBI database handles.

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

index 43fbeea..4d584a2 100644 (file)
@@ -22,7 +22,7 @@ $dbh->{RaiseError} = 1;
 my %data = (
     firstname =>  'my firstname',
     surname => 'my surname',
-    categorycode => 'UT',
+    categorycode => 'PT',
     branchcode => 'UT',
     cardnumber => 'ilsdi-cardnumber',
     userid => 'ilsdi-userid',
@@ -30,11 +30,11 @@ my %data = (
 );
 
 # Crate patron category
-unless ( GetBorrowercategory('UT') ) {
+unless ( GetBorrowercategory('PT') ) {
     $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');");
+    ('PT','Unit tester',99,99,0.000000,1,0.000000,'C','default');");
 }
 
 # Create branch