View | Details | Raw Unified | Return to bug 9761
Collapse All | Expand All

(-)a/t/db_dependent/Reserves.t (-1 / +14 lines)
Lines 22-27 $dbh->{AutoCommit} = 0; Link Here
22
$dbh->{RaiseError} = 1;
22
$dbh->{RaiseError} = 1;
23
23
24
# Setup Test------------------------
24
# Setup Test------------------------
25
26
# Add branches if not existing
27
foreach my $addbra ('CPL', 'FPL', 'RPL') {
28
    $dbh->do("INSERT INTO branches (branchcode,branchname) VALUES (?,?)", undef, ($addbra,"$addbra branch")) unless GetBranchName($addbra);
29
}
30
31
# Add categories if not existing
32
foreach my $addcat ('S', 'PT') {
33
    $dbh->do("INSERT INTO categories (categorycode,hidelostitems,category_type) VALUES (?,?,?)",undef,($addcat, 0, $addcat eq 'S'? 'S': 'A')) unless GetBorrowercategory($addcat);
34
}
35
25
# Helper biblio.
36
# Helper biblio.
26
diag("\nCreating biblio instance for testing.");
37
diag("\nCreating biblio instance for testing.");
27
my $bib = MARC::Record->new();
38
my $bib = MARC::Record->new();
Lines 32-37 $bib->append_fields( Link Here
32
);
43
);
33
my ($bibnum, $bibitemnum);
44
my ($bibnum, $bibitemnum);
34
($bibnum, $title, $bibitemnum) = AddBiblio($bib, '');
45
($bibnum, $title, $bibitemnum) = AddBiblio($bib, '');
46
35
# Helper item for that biblio.
47
# Helper item for that biblio.
36
diag("Creating item instance for testing.");
48
diag("Creating item instance for testing.");
37
my ($item_bibnum, $item_bibitemnum, $itemnumber) = AddItem({ homebranch => 'CPL', holdingbranch => 'CPL' } , $bibnum);
49
my ($item_bibnum, $item_bibitemnum, $itemnumber) = AddItem({ homebranch => 'CPL', holdingbranch => 'CPL' } , $bibnum);
Lines 199-201 is( $messages->{ResFound}->{borrowernumber}, Link Here
199
is( $messages->{ResFound}->{borrowernumber},
211
is( $messages->{ResFound}->{borrowernumber},
200
    $requesters{'RPL'},
212
    $requesters{'RPL'},
201
    'for generous library, its items fill first hold request in line (bug 10272)');
213
    'for generous library, its items fill first hold request in line (bug 10272)');
202
- 
214
215
$dbh->rollback;

Return to bug 9761