|
Lines 2576-2582
subtest '_FixAccountForLostAndReturned returns undef if patron is deleted' => su
Link Here
|
| 2576 |
}; |
2576 |
}; |
| 2577 |
|
2577 |
|
| 2578 |
subtest 'Set waiting flag' => sub { |
2578 |
subtest 'Set waiting flag' => sub { |
| 2579 |
plan tests => 4; |
2579 |
plan tests => 9; |
| 2580 |
|
2580 |
|
| 2581 |
my $library_1 = $builder->build( { source => 'Branch' } ); |
2581 |
my $library_1 = $builder->build( { source => 'Branch' } ); |
| 2582 |
my $patron_1 = $builder->build( { source => 'Borrower', value => { branchcode => $library_1->{branchcode}, categorycode => $patron_category->{categorycode} } } ); |
2582 |
my $patron_1 = $builder->build( { source => 'Borrower', value => { branchcode => $library_1->{branchcode}, categorycode => $patron_category->{categorycode} } } ); |
|
Lines 2613-2618
subtest 'Set waiting flag' => sub {
Link Here
|
| 2613 |
is( $hold->found, 'W', 'Hold is waiting' ); |
2613 |
is( $hold->found, 'W', 'Hold is waiting' ); |
| 2614 |
( $status ) = CheckReserves($item->{itemnumber}); |
2614 |
( $status ) = CheckReserves($item->{itemnumber}); |
| 2615 |
is( $status, 'Waiting', 'Now the hold is waiting'); |
2615 |
is( $status, 'Waiting', 'Now the hold is waiting'); |
|
|
2616 |
|
| 2617 |
#Bug 21944 - Waiting transfer checked in at branch other than pickup location |
| 2618 |
set_userenv( $library_1 ); |
| 2619 |
(undef, my $messages, undef, undef ) = AddReturn ( $item->{barcode}, $library_1->{branchcode} ); |
| 2620 |
$hold = Koha::Holds->find( $reserve_id ); |
| 2621 |
is( $hold->found, undef, 'Hold is no longer marked waiting' ); |
| 2622 |
is( $hold->priority, 1, "Hold is now priority one again"); |
| 2623 |
is( $messages->{ResFound}->{ResFound}, "Reserved", "Hold is still returned"); |
| 2624 |
is( $messages->{ResFound}->{found}, undef, "Hold is no longer marked found in return message"); |
| 2625 |
is( $messages->{ResFound}->{priority}, 1, "Hold is priority 1 in return message"); |
| 2626 |
|
| 2616 |
}; |
2627 |
}; |
| 2617 |
|
2628 |
|
| 2618 |
subtest 'Cancel transfers on lost items' => sub { |
2629 |
subtest 'Cancel transfers on lost items' => sub { |
| 2619 |
- |
|
|