View | Details | Raw Unified | Return to bug 35840
Collapse All | Expand All

(-)a/t/db_dependent/Circulation.t (-2 / +14 lines)
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 => 11;
2480
    plan tests => 14;
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 2529-2534 subtest 'CanBookBeIssued + Statistic patrons "X"' => sub { Link Here
2529
    $item_2->discard_changes;
2529
    $item_2->discard_changes;
2530
    ok( !$item_2->onloan, "Checked out item is returned" );
2530
    ok( !$item_2->onloan, "Checked out item is returned" );
2531
2531
2532
    my $item_3 = $builder->build_sample_item( { library => $library->branchcode } );
2533
    CanBookBeIssued( $patron, $item_3->barcode );
2534
    $item_3->discard_changes;
2535
    is( Koha::Statistics->search( { itemnumber => $item_3->itemnumber } )->count, 1, 'Single entry recorded in the stats table' );
2536
2537
    my $item_4 = $builder->build_sample_item( { library => $library->branchcode } );
2538
    AddIssue( $patron_2, $item_4->barcode );
2539
    $item_4->discard_changes;
2540
    is( Koha::Statistics->search( { itemnumber => $item_4->itemnumber } )->count, 1, 'Issue should be recorded in statistics table for item 4.' );
2541
    CanBookBeIssued( $patron, $item_4->barcode );
2542
    $item_4->discard_changes;
2543
    is( Koha::Statistics->search( { itemnumber => $item_4->itemnumber } )->count, 3, 'Issue, return, and localuse should be recorded in statistics table for item 4.' );
2544
2532
    # TODO There are other tests to provide here
2545
    # TODO There are other tests to provide here
2533
};
2546
};
2534
2547
2535
- 

Return to bug 35840