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

(-)a/t/db_dependent/Koha/Patrons.t (-3 / +3 lines)
Lines 1208-1214 subtest 'anonymise items_last_borrower' => sub { Link Here
1208
    t::lib::Mocks::mock_preference('StoreLastBorrower', 1);
1208
    t::lib::Mocks::mock_preference('StoreLastBorrower', 1);
1209
1209
1210
    subtest 'withrawn, lost and damaged items' => sub {
1210
    subtest 'withrawn, lost and damaged items' => sub {
1211
        plan tests => 5;
1211
        plan tests => 6;
1212
1212
1213
        my $patron = $builder->build_object(
1213
        my $patron = $builder->build_object(
1214
            {
1214
            {
Lines 1266-1272 subtest 'anonymise items_last_borrower' => sub { Link Here
1266
        $item_2->itemlost(1)->store;
1266
        $item_2->itemlost(1)->store;
1267
        $item_3->damaged(1)->store;
1267
        $item_3->damaged(1)->store;
1268
1268
1269
        Koha::Patrons->search_patrons_to_anonymise( { before => '2010-10-12' } )->anonymise_issue_history();
1269
        my $nb_rows = Koha::Patrons->search_patrons_to_anonymise( { before => '2010-10-12' } )->anonymise_issue_history();
1270
        is( $nb_rows, 4, 'anonymise_issue_history should have returned the number of checkouts anonymised');
1270
1271
1271
        my $dbh = C4::Context->dbh;
1272
        my $dbh = C4::Context->dbh;
1272
        my $sth = $dbh->prepare(q|SELECT borrowernumber FROM items_last_borrower where itemnumber = ?|);
1273
        my $sth = $dbh->prepare(q|SELECT borrowernumber FROM items_last_borrower where itemnumber = ?|);
1273
- 

Return to bug 23260