Lines 43-48
use Koha::Patrons;
Link Here
|
43 |
use Koha::Subscriptions; |
43 |
use Koha::Subscriptions; |
44 |
use Koha::Account::Lines; |
44 |
use Koha::Account::Lines; |
45 |
use Koha::Account::Offsets; |
45 |
use Koha::Account::Offsets; |
|
|
46 |
use Koha::Items; |
46 |
|
47 |
|
47 |
my $schema = Koha::Database->schema; |
48 |
my $schema = Koha::Database->schema; |
48 |
$schema->storage->txn_begin; |
49 |
$schema->storage->txn_begin; |
Lines 2379-2385
subtest '_FixOverduesOnReturn' => sub {
Link Here
|
2379 |
}; |
2380 |
}; |
2380 |
|
2381 |
|
2381 |
subtest 'Set waiting flag' => sub { |
2382 |
subtest 'Set waiting flag' => sub { |
2382 |
plan tests => 4; |
2383 |
plan tests => 9; |
2383 |
|
2384 |
|
2384 |
my $library_1 = $builder->build( { source => 'Branch' } ); |
2385 |
my $library_1 = $builder->build( { source => 'Branch' } ); |
2385 |
my $patron_1 = $builder->build( { source => 'Borrower', value => { branchcode => $library_1->{branchcode}, categorycode => $patron_category->{categorycode} } } ); |
2386 |
my $patron_1 = $builder->build( { source => 'Borrower', value => { branchcode => $library_1->{branchcode}, categorycode => $patron_category->{categorycode} } } ); |
Lines 2427-2432
subtest 'Set waiting flag' => sub {
Link Here
|
2427 |
is( $hold->found, 'W', 'Hold is waiting' ); |
2428 |
is( $hold->found, 'W', 'Hold is waiting' ); |
2428 |
( $status ) = CheckReserves($item->{itemnumber}); |
2429 |
( $status ) = CheckReserves($item->{itemnumber}); |
2429 |
is( $status, 'Waiting', 'Now the hold is waiting'); |
2430 |
is( $status, 'Waiting', 'Now the hold is waiting'); |
|
|
2431 |
|
2432 |
#Bug 21944 - Waiting transfer checked in at branch other than pickup location |
2433 |
set_userenv( $library_1 ); |
2434 |
(undef, my $messages, undef, undef ) = AddReturn ( $item->{barcode}, $library_1->{branchcode} ); |
2435 |
$hold = Koha::Holds->find( $reserve_id ); |
2436 |
is( $hold->found, undef, 'Hold is no longer marked waiting' ); |
2437 |
is( $hold->priority, 1, "Hold is now priority one again"); |
2438 |
is( $messages->{ResFound}->{ResFound}, "Reserved", "Hold is still returned"); |
2439 |
is( $messages->{ResFound}->{found}, undef, "Hold is no longer marked found in return message"); |
2440 |
is( $messages->{ResFound}->{priority}, 1, "Hold is priority 1 in return message"); |
2441 |
|
2430 |
}; |
2442 |
}; |
2431 |
|
2443 |
|
2432 |
subtest 'Cancel transfers on lost items' => sub { |
2444 |
subtest 'Cancel transfers on lost items' => sub { |
2433 |
- |
|
|