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

(-)a/t/db_dependent/Holds.t (-3 / +18 lines)
Lines 8-14 use t::lib::TestBuilder; Link Here
8
use C4::Context;
8
use C4::Context;
9
use C4::Branch;
9
use C4::Branch;
10
10
11
use Test::More tests => 60;
11
use Test::More tests => 61;
12
use MARC::Record;
12
use MARC::Record;
13
use C4::Biblio;
13
use C4::Biblio;
14
use C4::Items;
14
use C4::Items;
Lines 34-40 my $dbh = C4::Context->dbh; Link Here
34
my $branch_1 = $builder->build({ source => 'Branch' })->{ branchcode };
34
my $branch_1 = $builder->build({ source => 'Branch' })->{ branchcode };
35
my $branch_2 = $builder->build({ source => 'Branch' })->{ branchcode };
35
my $branch_2 = $builder->build({ source => 'Branch' })->{ branchcode };
36
36
37
my $category = $builder->build({ source => 'Category' });
37
my $category = $builder->build({
38
    source => 'Category',
39
    value => {
40
        BlockExpiredPatronOpacActions => -1,
41
    },
42
});
38
43
39
my $borrowers_count = 5;
44
my $borrowers_count = 5;
40
45
Lines 473-478 my $res_id = AddReserve( $branch_1, $borrowernumbers[0], $bibnum, '', 1, ); Link Here
473
is( CanItemBeReserved( $borrowernumbers[0], $itemnumber ),
478
is( CanItemBeReserved( $borrowernumbers[0], $itemnumber ),
474
    'tooManyReserves', 'Patron cannot reserve item with hold limit of 1, 1 bib level hold placed' );
479
    'tooManyReserves', 'Patron cannot reserve item with hold limit of 1, 1 bib level hold placed' );
475
480
481
my $expired_borrowernumber = AddMember(
482
    firstname =>  'Expired',
483
    surname => 'Patron',
484
    categorycode => $category->{categorycode},
485
    branchcode => $branch_1,
486
    dateexpiry => '2000-01-01',
487
);
488
t::lib::Mocks::mock_preference('BlockExpiredPatronOpacActions', 1);
489
is(CanItemBeReserved($expired_borrowernumber, $itemnumber),
490
    'expired', 'Expired patron cannot reserve');
491
476
492
477
# Helper method to set up a Biblio.
493
# Helper method to set up a Biblio.
478
sub create_helper_biblio {
494
sub create_helper_biblio {
479
- 

Return to bug 17229