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

(-)a/t/db_dependent/HoldsQueue.t (-10 / +5 lines)
Lines 17-28 use C4::Context; Link Here
17
use C4::Members;
17
use C4::Members;
18
use Koha::Database;
18
use Koha::Database;
19
use Koha::DateUtils;
19
use Koha::DateUtils;
20
use Koha::ItemType;
21
20
22
use t::lib::TestBuilder;
21
use t::lib::TestBuilder;
23
22
24
use Koha::ItemTypes;
25
26
BEGIN {
23
BEGIN {
27
    use FindBin;
24
    use FindBin;
28
    use lib $FindBin::Bin;
25
    use lib $FindBin::Bin;
Lines 178-184 $dbh->do("DELETE FROM default_circ_rules"); Link Here
178
175
179
C4::Context->set_preference('UseTransportCostMatrix', 0);
176
C4::Context->set_preference('UseTransportCostMatrix', 0);
180
177
181
$itemtype = Koha::ItemTypes->search->next->itemtype;
178
$itemtype = $builder->build({ source => 'Itemtype', value => { notforloan => 0 } })->{itemtype};
182
179
183
$library1 = $builder->build({
180
$library1 = $builder->build({
184
    source => 'Branch',
181
    source => 'Branch',
Lines 337-343 is( scalar( @$holds_queue ), 2, "Holds not filled with items from closed librari Link Here
337
C4::Context->set_preference( 'HoldsQueueSkipClosed', 0 );
334
C4::Context->set_preference( 'HoldsQueueSkipClosed', 0 );
338
335
339
# Bug 14297
336
# Bug 14297
340
$itemtype = Koha::ItemTypes->search->next->itemtype;
337
$itemtype = $builder->build({ source => 'Itemtype', value => { notforloan => 0 } })->{itemtype};
341
$borrowernumber = $borrower3->{borrowernumber};
338
$borrowernumber = $borrower3->{borrowernumber};
342
my $library_A = $library1->{branchcode};
339
my $library_A = $library1->{branchcode};
343
my $library_B = $library2->{branchcode};
340
my $library_B = $library2->{branchcode};
Lines 394-400 is( @$holds_queue, 1, "Bug 14297 - Holds Queue building ignoring holds where pic Link Here
394
# End Bug 14297
391
# End Bug 14297
395
392
396
# Bug 15062
393
# Bug 15062
397
$itemtype = Koha::ItemTypes->search->next->itemtype;
394
$itemtype = $builder->build({ source => 'Itemtype', value => { notforloan => 0 } })->{itemtype};
398
$borrowernumber = $borrower2->{borrowernumber};
395
$borrowernumber = $borrower2->{borrowernumber};
399
$library_A = $library1->{branchcode};
396
$library_A = $library1->{branchcode};
400
$library_B = $library2->{branchcode};
397
$library_B = $library2->{branchcode};
Lines 555-563 CancelReserve( { reserve_id => $reserve_id } ); Link Here
555
552
556
# Test hold itemtype limit
553
# Test hold itemtype limit
557
C4::Context->set_preference( "UseTransportCostMatrix", 0 );
554
C4::Context->set_preference( "UseTransportCostMatrix", 0 );
558
my @itemtypes = Koha::ItemTypes->search();
555
my $wrong_itemtype = $builder->build({ source => 'Itemtype', value => { notforloan => 0 } })->{itemtype};
559
my $wrong_itemtype = $itemtypes[0]->itemtype;
556
my $right_itemtype = $builder->build({ source => 'Itemtype', value => { notforloan => 0 } })->{itemtype};
560
my $right_itemtype = $itemtypes[1]->itemtype;
561
$borrowernumber = $borrower3->{borrowernumber};
557
$borrowernumber = $borrower3->{borrowernumber};
562
my $branchcode = $library1->{branchcode};
558
my $branchcode = $library1->{branchcode};
563
$dbh->do("DELETE FROM reserves");
559
$dbh->do("DELETE FROM reserves");
564
- 

Return to bug 16671