Browse Source

Bug 6254: (follow-up) work-around to fix a failing test case

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>
MM-OPAC/theme_dep
Galen Charlton 8 years ago
parent
commit
c4f7164cb9
  1. 8
      t/db_dependent/ILSDI_Services.t

8
t/db_dependent/ILSDI_Services.t

@ -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

Loading…
Cancel
Save