|
Lines 2477-2483
subtest 'CanBookBeIssued + Koha::Patron->is_debarred|has_overdues' => sub {
Link Here
|
| 2477 |
}; |
2477 |
}; |
| 2478 |
|
2478 |
|
| 2479 |
subtest 'CanBookBeIssued + Statistic patrons "X"' => sub { |
2479 |
subtest 'CanBookBeIssued + Statistic patrons "X"' => sub { |
| 2480 |
plan tests => 14; |
2480 |
plan tests => 13; |
| 2481 |
|
2481 |
|
| 2482 |
my $library = $builder->build_object( { class => 'Koha::Libraries' } ); |
2482 |
my $library = $builder->build_object( { class => 'Koha::Libraries' } ); |
| 2483 |
my $patron_category_x = $builder->build_object( |
2483 |
my $patron_category_x = $builder->build_object( |
|
Lines 2528-2537
subtest 'CanBookBeIssued + Statistic patrons "X"' => sub {
Link Here
|
| 2528 |
$item_2->discard_changes; |
2528 |
$item_2->discard_changes; |
| 2529 |
ok( $item_2->onloan, "Item is checked out" ); |
2529 |
ok( $item_2->onloan, "Item is checked out" ); |
| 2530 |
|
2530 |
|
| 2531 |
( $error, $question, $alerts ) = CanBookBeIssued( $patron, $item_2->barcode ); |
|
|
| 2532 |
$item_2->discard_changes; |
| 2533 |
ok( !$item_2->onloan, "Checked out item is returned" ); |
| 2534 |
|
| 2535 |
my $item_3 = $builder->build_sample_item( { library => $library->branchcode } ); |
2531 |
my $item_3 = $builder->build_sample_item( { library => $library->branchcode } ); |
| 2536 |
CanBookBeIssued( $patron, $item_3->barcode ); |
2532 |
CanBookBeIssued( $patron, $item_3->barcode ); |
| 2537 |
$item_3->discard_changes; |
2533 |
$item_3->discard_changes; |
|
Lines 2550-2556
subtest 'CanBookBeIssued + Statistic patrons "X"' => sub {
Link Here
|
| 2550 |
CanBookBeIssued( $patron, $item_4->barcode ); |
2546 |
CanBookBeIssued( $patron, $item_4->barcode ); |
| 2551 |
$item_4->discard_changes; |
2547 |
$item_4->discard_changes; |
| 2552 |
is( |
2548 |
is( |
| 2553 |
Koha::Statistics->search( { itemnumber => $item_4->itemnumber } )->count, 3, |
2549 |
Koha::Statistics->search( { itemnumber => $item_4->itemnumber } )->count, 2, |
| 2554 |
'Issue, return, and localuse should be recorded in statistics table for item 4.' |
2550 |
'Issue, return, and localuse should be recorded in statistics table for item 4.' |
| 2555 |
); |
2551 |
); |
| 2556 |
|
2552 |
|
| 2557 |
- |
|
|