Lines 2651-2657
subtest '_FixAccountForLostAndReturned returns undef if patron is deleted' => su
Link Here
|
2651 |
}; |
2651 |
}; |
2652 |
|
2652 |
|
2653 |
subtest 'Set waiting flag' => sub { |
2653 |
subtest 'Set waiting flag' => sub { |
2654 |
plan tests => 4; |
2654 |
plan tests => 9; |
2655 |
|
2655 |
|
2656 |
my $library_1 = $builder->build( { source => 'Branch' } ); |
2656 |
my $library_1 = $builder->build( { source => 'Branch' } ); |
2657 |
my $patron_1 = $builder->build( { source => 'Borrower', value => { branchcode => $library_1->{branchcode}, categorycode => $patron_category->{categorycode} } } ); |
2657 |
my $patron_1 = $builder->build( { source => 'Borrower', value => { branchcode => $library_1->{branchcode}, categorycode => $patron_category->{categorycode} } } ); |
Lines 2699-2704
subtest 'Set waiting flag' => sub {
Link Here
|
2699 |
is( $hold->found, 'W', 'Hold is waiting' ); |
2699 |
is( $hold->found, 'W', 'Hold is waiting' ); |
2700 |
( $status ) = CheckReserves($item->{itemnumber}); |
2700 |
( $status ) = CheckReserves($item->{itemnumber}); |
2701 |
is( $status, 'Waiting', 'Now the hold is waiting'); |
2701 |
is( $status, 'Waiting', 'Now the hold is waiting'); |
|
|
2702 |
|
2703 |
#Bug 21944 - Waiting transfer checked in at branch other than pickup location |
2704 |
set_userenv( $library_1 ); |
2705 |
(undef, my $messages, undef, undef ) = AddReturn ( $item->{barcode}, $library_1->{branchcode} ); |
2706 |
$hold = Koha::Holds->find( $reserve_id ); |
2707 |
is( $hold->found, undef, 'Hold is no longer marked waiting' ); |
2708 |
is( $hold->priority, 1, "Hold is now priority one again"); |
2709 |
is( $messages->{ResFound}->{ResFound}, "Reserved", "Hold is still returned"); |
2710 |
is( $messages->{ResFound}->{found}, undef, "Hold is no longer marked found in return message"); |
2711 |
is( $messages->{ResFound}->{priority}, 1, "Hold is priority 1 in return message"); |
2712 |
|
2702 |
}; |
2713 |
}; |
2703 |
|
2714 |
|
2704 |
subtest 'Cancel transfers on lost items' => sub { |
2715 |
subtest 'Cancel transfers on lost items' => sub { |
2705 |
- |
|
|