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

(-)a/t/db_dependent/ILSDI_Services.t (-3 / +20 lines)
Lines 300-306 subtest 'LookupPatron test' => sub { Link Here
300
300
301
subtest 'Holds test' => sub {
301
subtest 'Holds test' => sub {
302
302
303
    plan tests => 8;
303
    plan tests => 9;
304
304
305
    $schema->storage->txn_begin;
305
    $schema->storage->txn_begin;
306
306
Lines 359-365 subtest 'Holds test' => sub { Link Here
359
            itemtype     => $item2->{itype},
359
            itemtype     => $item2->{itype},
360
            branchcode   => $patron->{branchcode},
360
            branchcode   => $patron->{branchcode},
361
            rule_name    => 'reservesallowed',
361
            rule_name    => 'reservesallowed',
362
            rule_value   => 0,
362
            rule_value   => 1,
363
        }
363
        }
364
    );
364
    );
365
365
Lines 371-376 subtest 'Holds test' => sub { Link Here
371
    $reply = C4::ILSDI::Services::HoldItem( $query );
371
    $reply = C4::ILSDI::Services::HoldItem( $query );
372
    is( $reply->{code}, 'tooManyReserves', "Too many reserves" );
372
    is( $reply->{code}, 'tooManyReserves', "Too many reserves" );
373
373
374
    Koha::CirculationRules->set_rule(
375
        {
376
            categorycode => $patron->{categorycode},
377
            itemtype     => $item2->{itype},
378
            branchcode   => $patron->{branchcode},
379
            rule_name    => 'reservesallowed',
380
            rule_value   => 0,
381
        }
382
    );
383
384
    $query = CGI->new;
385
    $query->param( 'patron_id', $patron->{borrowernumber});
386
    $query->param( 'bib_id', $item2->biblionumber);
387
    $query->param( 'item_id', $item2->itemnumber);
388
389
    $reply = C4::ILSDI::Services::HoldItem( $query );
390
    is( $reply->{code}, 'noReservesAllowed', "No reserves allowed" );
391
374
    my $origin_branch = $builder->build(
392
    my $origin_branch = $builder->build(
375
        {
393
        {
376
            source => 'Branch',
394
            source => 'Branch',
377
- 

Return to bug 16787