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

(-)a/t/db_dependent/Circulation.t (-2 / +13 lines)
Lines 40-45 use Koha::Patrons; Link Here
40
use Koha::Subscriptions;
40
use Koha::Subscriptions;
41
use Koha::Account::Lines;
41
use Koha::Account::Lines;
42
use Koha::Account::Offsets;
42
use Koha::Account::Offsets;
43
use Koha::Items;
43
44
44
my $schema = Koha::Database->schema;
45
my $schema = Koha::Database->schema;
45
$schema->storage->txn_begin;
46
$schema->storage->txn_begin;
Lines 2365-2371 subtest '_FixOverduesOnReturn' => sub { Link Here
2365
};
2366
};
2366
2367
2367
subtest 'Set waiting flag' => sub {
2368
subtest 'Set waiting flag' => sub {
2368
    plan tests => 4;
2369
    plan tests => 8;
2369
2370
2370
    my $library_1 = $builder->build( { source => 'Branch' } );
2371
    my $library_1 = $builder->build( { source => 'Branch' } );
2371
    my $patron_1  = $builder->build( { source => 'Borrower', value => { branchcode => $library_1->{branchcode}, categorycode => $patron_category->{categorycode} } } );
2372
    my $patron_1  = $builder->build( { source => 'Borrower', value => { branchcode => $library_1->{branchcode}, categorycode => $patron_category->{categorycode} } } );
Lines 2413-2418 subtest 'Set waiting flag' => sub { Link Here
2413
    is( $hold->found, 'W', 'Hold is waiting' );
2414
    is( $hold->found, 'W', 'Hold is waiting' );
2414
    ( $status ) = CheckReserves($item->{itemnumber});
2415
    ( $status ) = CheckReserves($item->{itemnumber});
2415
    is( $status, 'Waiting', 'Now the hold is waiting');
2416
    is( $status, 'Waiting', 'Now the hold is waiting');
2417
2418
    #Bug 21944 - Waiting transfer checked in at branch other than pickup location
2419
    
2420
    $do_transfer = 1;
2421
    AddReturn( $item->{barcode}, $library_1->{branchcode} );
2422
    ModReserveAffect( $item->{itemnumber}, undef, $do_transfer, $reserve_id );
2423
    $hold = Koha::Holds->find( $reserve_id );
2424
    is( $hold->found, 'T', 'Hold is in transit' );
2425
    is( $hold->branchcode, $library_2->{branchcode}, 'Item destination matches the pickup branch');
2426
    ( $status ) = CheckReserves($item->{itemnumber});
2427
    is( $status, 'Reserved', 'Now the hold is set back to reserved');
2416
};
2428
};
2417
2429
2418
subtest 'CanBookBeIssued | is_overdue' => sub {
2430
subtest 'CanBookBeIssued | is_overdue' => sub {
2419
- 

Return to bug 21944