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

(-)a/t/db_dependent/Reserves.t (-5 / +17 lines)
Lines 1-5 Link Here
1
#!/usr/bin/perl
1
#!/usr/bin/perl
2
2
3
# This file is part of Koha.
4
#
5
# Koha is free software; you can redistribute it and/or modify it
6
# under the terms of the GNU General Public License as published by
7
# the Free Software Foundation; either version 3 of the License, or
8
# (at your option) any later version.
9
#
10
# Koha is distributed in the hope that it will be useful, but
11
# WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
# GNU General Public License for more details.
14
#
15
# You should have received a copy of the GNU General Public License
16
# along with Koha; if not, see <http://www.gnu.org/licenses>.
17
3
use Modern::Perl;
18
use Modern::Perl;
4
19
5
use Test::More tests => 50;
20
use Test::More tests => 50;
Lines 44-51 foreach my $addcat ('S', 'PT') { Link Here
44
    $dbh->do("INSERT INTO categories (categorycode,hidelostitems,category_type) VALUES (?,?,?)",undef,($addcat, 0, $addcat eq 'S'? 'S': 'A')) unless GetBorrowercategory($addcat);
59
    $dbh->do("INSERT INTO categories (categorycode,hidelostitems,category_type) VALUES (?,?,?)",undef,($addcat, 0, $addcat eq 'S'? 'S': 'A')) unless GetBorrowercategory($addcat);
45
}
60
}
46
61
47
# Helper biblio.
62
# Create a helper biblio
48
diag("\nCreating biblio instance for testing.");
49
my $bib = MARC::Record->new();
63
my $bib = MARC::Record->new();
50
my $title = 'Silence in the library';
64
my $title = 'Silence in the library';
51
if( C4::Context->preference('marcflavour') eq 'UNIMARC' ) {
65
if( C4::Context->preference('marcflavour') eq 'UNIMARC' ) {
Lines 63-70 else { Link Here
63
my ($bibnum, $bibitemnum);
77
my ($bibnum, $bibitemnum);
64
($bibnum, $title, $bibitemnum) = AddBiblio($bib, '');
78
($bibnum, $title, $bibitemnum) = AddBiblio($bib, '');
65
79
66
# Helper item for that biblio.
80
# Create a helper item instance for testing
67
diag("Creating item instance for testing.");
68
my ($item_bibnum, $item_bibitemnum, $itemnumber) = AddItem({ homebranch => 'CPL', holdingbranch => 'CPL' } , $bibnum);
81
my ($item_bibnum, $item_bibitemnum, $itemnumber) = AddItem({ homebranch => 'CPL', holdingbranch => 'CPL' } , $bibnum);
69
82
70
# Modify item; setting barcode.
83
# Modify item; setting barcode.
71
- 

Return to bug 12876