Lines 2114-2121
subtest 'Remove item from holds queue on checkout' => sub {
Link Here
|
2114 |
} |
2114 |
} |
2115 |
); |
2115 |
); |
2116 |
|
2116 |
|
2117 |
my $item = $builder->build_sample_item( |
2117 |
my $item = $builder->build_sample_item( { homebranch => $lib->branchcode, holdingbranch => $lib->branchcode } ); |
2118 |
{ homebranch => $lib->branchcode, holdingbranch => $lib->branchcode } ); |
|
|
2119 |
|
2118 |
|
2120 |
t::lib::Mocks::mock_userenv( { branchcode => $lib->branchcode } ); |
2119 |
t::lib::Mocks::mock_userenv( { branchcode => $lib->branchcode } ); |
2121 |
|
2120 |
|
Lines 2131-2141
subtest 'Remove item from holds queue on checkout' => sub {
Link Here
|
2131 |
|
2130 |
|
2132 |
C4::HoldsQueue::CreateQueue(); |
2131 |
C4::HoldsQueue::CreateQueue(); |
2133 |
|
2132 |
|
2134 |
is( Koha::Hold::HoldsQueueItems->search({ itemnumber => $item->id })->count(), 1, "Item is found in the holds queue" ); |
2133 |
is( |
|
|
2134 |
Koha::Hold::HoldsQueueItems->search( { itemnumber => $item->id } )->count(), 1, |
2135 |
"Item is found in the holds queue" |
2136 |
); |
2135 |
|
2137 |
|
2136 |
AddIssue( $patron1, $item->barcode, dt_from_string ); |
2138 |
AddIssue( $patron1, $item->barcode, dt_from_string ); |
2137 |
|
2139 |
|
2138 |
is( Koha::Hold::HoldsQueueItems->search({ itemnumber => $item->id })->count(), 0, "Item is no longer found in the holds queue" ); |
2140 |
is( |
|
|
2141 |
Koha::Hold::HoldsQueueItems->search( { itemnumber => $item->id } )->count(), 0, |
2142 |
"Item is no longer found in the holds queue" |
2143 |
); |
2139 |
|
2144 |
|
2140 |
$schema->storage->txn_rollback; |
2145 |
$schema->storage->txn_rollback; |
2141 |
}; |
2146 |
}; |
2142 |
- |
|
|