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

(-)a/t/db_dependent/Koha/Patrons.t (-3 / +3 lines)
Lines 1295-1301 subtest 'anonymise items_last_borrower' => sub { Link Here
1295
    t::lib::Mocks::mock_preference('StoreLastBorrower', 1);
1295
    t::lib::Mocks::mock_preference('StoreLastBorrower', 1);
1296
1296
1297
    subtest 'withrawn, lost and damaged items' => sub {
1297
    subtest 'withrawn, lost and damaged items' => sub {
1298
        plan tests => 5;
1298
        plan tests => 6;
1299
1299
1300
        my $patron = $builder->build_object(
1300
        my $patron = $builder->build_object(
1301
            {
1301
            {
Lines 1353-1359 subtest 'anonymise items_last_borrower' => sub { Link Here
1353
        $item_2->itemlost(1)->store;
1353
        $item_2->itemlost(1)->store;
1354
        $item_3->damaged(1)->store;
1354
        $item_3->damaged(1)->store;
1355
1355
1356
        Koha::Patrons->search_patrons_to_anonymise( { before => '2010-10-12' } )->anonymise_issue_history();
1356
        my $nb_rows = Koha::Patrons->search_patrons_to_anonymise( { before => '2010-10-12' } )->anonymise_issue_history();
1357
        is( $nb_rows, 4, 'anonymise_issue_history should have returned the number of checkouts anonymised');
1357
1358
1358
        my $dbh = C4::Context->dbh;
1359
        my $dbh = C4::Context->dbh;
1359
        my $sth = $dbh->prepare(q|SELECT borrowernumber FROM items_last_borrower where itemnumber = ?|);
1360
        my $sth = $dbh->prepare(q|SELECT borrowernumber FROM items_last_borrower where itemnumber = ?|);
1360
- 

Return to bug 23260