|
Lines 22-28
use C4::Context;
Link Here
|
| 22 |
use C4::Biblio qw( AddBiblio ); |
22 |
use C4::Biblio qw( AddBiblio ); |
| 23 |
use Koha::Database; |
23 |
use Koha::Database; |
| 24 |
use Koha::Libraries; |
24 |
use Koha::Libraries; |
| 25 |
use C4::Calendar qw( new insert_single_holiday ); |
25 |
use C4::Calendar; |
| 26 |
use Koha::Patrons; |
26 |
use Koha::Patrons; |
| 27 |
use Koha::Holds; |
27 |
use Koha::Holds; |
| 28 |
use Koha::Item; |
28 |
use Koha::Item; |
|
Lines 356-362
subtest "delete() tests" => sub {
Link Here
|
| 356 |
"Koha::Hold->delete should have deleted the hold" |
356 |
"Koha::Hold->delete should have deleted the hold" |
| 357 |
); |
357 |
); |
| 358 |
|
358 |
|
| 359 |
my $number_of_logs = $schema->resultset('ActionLog') |
359 |
my $number_of_logs = |
|
|
360 |
$schema->resultset('ActionLog') |
| 360 |
->search( { module => 'HOLDS', action => 'DELETE', object => $hold->{reserve_id} } )->count; |
361 |
->search( { module => 'HOLDS', action => 'DELETE', object => $hold->{reserve_id} } )->count; |
| 361 |
is( $number_of_logs, 0, 'With HoldsLogs, Koha::Hold->delete shouldn\'t have been logged' ); |
362 |
is( $number_of_logs, 0, 'With HoldsLogs, Koha::Hold->delete shouldn\'t have been logged' ); |
| 362 |
|
363 |
|
|
Lines 376-382
subtest "delete() tests" => sub {
Link Here
|
| 376 |
"Koha::Hold->delete should have deleted the hold" |
377 |
"Koha::Hold->delete should have deleted the hold" |
| 377 |
); |
378 |
); |
| 378 |
|
379 |
|
| 379 |
$number_of_logs = $schema->resultset('ActionLog') |
380 |
$number_of_logs = |
|
|
381 |
$schema->resultset('ActionLog') |
| 380 |
->search( { module => 'HOLDS', action => 'DELETE', object => $hold->{reserve_id} } )->count; |
382 |
->search( { module => 'HOLDS', action => 'DELETE', object => $hold->{reserve_id} } )->count; |
| 381 |
is( $number_of_logs, 1, 'With HoldsLogs, Koha::Hold->delete should have been logged' ); |
383 |
is( $number_of_logs, 1, 'With HoldsLogs, Koha::Hold->delete should have been logged' ); |
| 382 |
|
384 |
|