|
Lines 2600-2607
subtest 'CanBookBeIssued + Koha::Patron->is_debarred|has_overdues' => sub {
Link Here
|
| 2600 |
is( $error->{USERBLOCKEDNOENDDATE}, '9999-12-31', 'USERBLOCKEDNOENDDATE should be 9999-12-31 for unlimited debarments' ); |
2600 |
is( $error->{USERBLOCKEDNOENDDATE}, '9999-12-31', 'USERBLOCKEDNOENDDATE should be 9999-12-31 for unlimited debarments' ); |
| 2601 |
}; |
2601 |
}; |
| 2602 |
|
2602 |
|
| 2603 |
subtest 'CanBookBeIssued + Statistic patrons "X"' => sub { |
2603 |
subtest 'Statistic patrons "X"' => sub { |
| 2604 |
plan tests => 13; |
2604 |
plan tests => 15; |
| 2605 |
|
2605 |
|
| 2606 |
my $library = $builder->build_object( { class => 'Koha::Libraries' } ); |
2606 |
my $library = $builder->build_object( { class => 'Koha::Libraries' } ); |
| 2607 |
my $patron_category_x = $builder->build_object( |
2607 |
my $patron_category_x = $builder->build_object( |
|
Lines 2660-2665
subtest 'CanBookBeIssued + Statistic patrons "X"' => sub {
Link Here
|
| 2660 |
'Single entry recorded in the stats table' |
2660 |
'Single entry recorded in the stats table' |
| 2661 |
); |
2661 |
); |
| 2662 |
|
2662 |
|
|
|
2663 |
AddReturn( $item_3->barcode, C4::Context->userenv->{'branch'}, undef, undef, 1 ); |
| 2664 |
$item_3->discard_changes; |
| 2665 |
is( |
| 2666 |
Koha::Statistics->search( { itemnumber => $item_3->itemnumber } )->count, 1, |
| 2667 |
'Stats skipped in AddReturn when there was no checkout and skip_localuse was passed' |
| 2668 |
); |
| 2669 |
|
| 2663 |
my $item_4 = $builder->build_sample_item( { library => $library->branchcode } ); |
2670 |
my $item_4 = $builder->build_sample_item( { library => $library->branchcode } ); |
| 2664 |
AddIssue( $patron_2, $item_4->barcode ); |
2671 |
AddIssue( $patron_2, $item_4->barcode ); |
| 2665 |
$item_4->discard_changes; |
2672 |
$item_4->discard_changes; |
|
Lines 2671-2676
subtest 'CanBookBeIssued + Statistic patrons "X"' => sub {
Link Here
|
| 2671 |
$item_4->discard_changes; |
2678 |
$item_4->discard_changes; |
| 2672 |
is( |
2679 |
is( |
| 2673 |
Koha::Statistics->search( { itemnumber => $item_4->itemnumber } )->count, 2, |
2680 |
Koha::Statistics->search( { itemnumber => $item_4->itemnumber } )->count, 2, |
|
|
2681 |
'Issue and localuse should be recorded in statistics table for item 4.' |
| 2682 |
); |
| 2683 |
|
| 2684 |
AddReturn( $item_4->barcode, C4::Context->userenv->{'branch'}, undef, undef, 1 ); |
| 2685 |
$item_4->discard_changes; |
| 2686 |
is( |
| 2687 |
Koha::Statistics->search( { itemnumber => $item_4->itemnumber } )->count, 3, |
| 2674 |
'Issue, return, and localuse should be recorded in statistics table for item 4.' |
2688 |
'Issue, return, and localuse should be recorded in statistics table for item 4.' |
| 2675 |
); |
2689 |
); |
| 2676 |
|
2690 |
|
| 2677 |
- |
|
|