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

(-)a/t/db_dependent/Circulation.t (-2 / +14 lines)
Lines 2434-2440 subtest 'CanBookBeIssued + Koha::Patron->is_debarred|has_overdues' => sub { Link Here
2434
};
2434
};
2435
2435
2436
subtest 'CanBookBeIssued + Statistic patrons "X"' => sub {
2436
subtest 'CanBookBeIssued + Statistic patrons "X"' => sub {
2437
    plan tests => 11;
2437
    plan tests => 14;
2438
2438
2439
    my $library = $builder->build_object( { class => 'Koha::Libraries' } );
2439
    my $library = $builder->build_object( { class => 'Koha::Libraries' } );
2440
    my $patron_category_x = $builder->build_object(
2440
    my $patron_category_x = $builder->build_object(
Lines 2486-2491 subtest 'CanBookBeIssued + Statistic patrons "X"' => sub { Link Here
2486
    $item_2->discard_changes;
2486
    $item_2->discard_changes;
2487
    ok( !$item_2->onloan, "Checked out item is returned" );
2487
    ok( !$item_2->onloan, "Checked out item is returned" );
2488
2488
2489
    my $item_3 = $builder->build_sample_item( { library => $library->branchcode } );
2490
    CanBookBeIssued( $patron, $item_3->barcode );
2491
    $item_3->discard_changes;
2492
    is( Koha::Statistics->search( { itemnumber => $item_3->itemnumber } )->count, 1, 'Single entry recorded in the stats table' );
2493
2494
    my $item_4 = $builder->build_sample_item( { library => $library->branchcode } );
2495
    AddIssue( $patron_2, $item_4->barcode );
2496
    $item_4->discard_changes;
2497
    is( Koha::Statistics->search( { itemnumber => $item_4->itemnumber } )->count, 1, 'Issue should be recorded in statistics table for item 4.' );
2498
    CanBookBeIssued( $patron, $item_4->barcode );
2499
    $item_4->discard_changes;
2500
    is( Koha::Statistics->search( { itemnumber => $item_4->itemnumber } )->count, 3, 'Issue, return, and localuse should be recorded in statistics table for item 4.' );
2501
2489
    # TODO There are other tests to provide here
2502
    # TODO There are other tests to provide here
2490
};
2503
};
2491
2504
2492
- 

Return to bug 35840