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

(-)a/t/db_dependent/Circulation.t (-2 / +13 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 => 9;
2437
    plan tests => 11;
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 2474-2479 subtest 'CanBookBeIssued + Statistic patrons "X"' => sub { Link Here
2474
    is( $stat->categorycode,   $patron->categorycode,            'Recorded a categorycode' );
2474
    is( $stat->categorycode,   $patron->categorycode,            'Recorded a categorycode' );
2475
    is( $stat->location,       $item_1->location,                'Recorded a location' );
2475
    is( $stat->location,       $item_1->location,                'Recorded a location' );
2476
2476
2477
2478
    t::lib::Mocks::mock_userenv({ branchcode => $library->branchcode });
2479
    my $patron_2  = $builder->build_object( { class => 'Koha::Patrons', value => { categorycode => $patron_category->{categorycode} } } );
2480
    my $item_2 = $builder->build_sample_item( { library => $library->branchcode } );
2481
    my $issue = AddIssue( $patron_2, $item_2->barcode );
2482
    $item_2->discard_changes;
2483
    ok($item_2->onloan, "Item is checked out");
2484
2485
    ( $error, $question, $alerts ) = CanBookBeIssued( $patron, $item_2->barcode );
2486
    $item_2->discard_changes;
2487
    ok(!$item_2->onloan, "Checked out item is returned");
2488
2477
    # TODO There are other tests to provide here
2489
    # TODO There are other tests to provide here
2478
};
2490
};
2479
2491
2480
- 

Return to bug 27992