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

(-)a/t/db_dependent/Koha/Patrons.t (-3 / +3 lines)
Lines 1219-1225 subtest 'anonymise items_last_borrower' => sub { Link Here
1219
    t::lib::Mocks::mock_preference('StoreLastBorrower', 1);
1219
    t::lib::Mocks::mock_preference('StoreLastBorrower', 1);
1220
1220
1221
    subtest 'withrawn, lost and damaged items' => sub {
1221
    subtest 'withrawn, lost and damaged items' => sub {
1222
        plan tests => 5;
1222
        plan tests => 6;
1223
1223
1224
        my $patron = $builder->build_object(
1224
        my $patron = $builder->build_object(
1225
            {
1225
            {
Lines 1277-1283 subtest 'anonymise items_last_borrower' => sub { Link Here
1277
        $item_2->itemlost(1)->store;
1277
        $item_2->itemlost(1)->store;
1278
        $item_3->damaged(1)->store;
1278
        $item_3->damaged(1)->store;
1279
1279
1280
        Koha::Patrons->search_patrons_to_anonymise( { before => '2010-10-12' } )->anonymise_issue_history();
1280
        my $nb_rows = Koha::Patrons->search_patrons_to_anonymise( { before => '2010-10-12' } )->anonymise_issue_history();
1281
        is( $nb_rows, 4, 'anonymise_issue_history should have returned the number of checkouts anonymised');
1281
1282
1282
        my $dbh = C4::Context->dbh;
1283
        my $dbh = C4::Context->dbh;
1283
        my $sth = $dbh->prepare(q|SELECT borrowernumber FROM items_last_borrower where itemnumber = ?|);
1284
        my $sth = $dbh->prepare(q|SELECT borrowernumber FROM items_last_borrower where itemnumber = ?|);
1284
- 

Return to bug 23260