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

(-)a/t/db_dependent/Koha/Patrons.t (-3 / +3 lines)
Lines 1180-1186 subtest 'anonymise items_last_borrower' => sub { Link Here
1180
    t::lib::Mocks::mock_preference('StoreLastBorrower', 1);
1180
    t::lib::Mocks::mock_preference('StoreLastBorrower', 1);
1181
1181
1182
    subtest 'withrawn, lost and damaged items' => sub {
1182
    subtest 'withrawn, lost and damaged items' => sub {
1183
        plan tests => 5;
1183
        plan tests => 6;
1184
1184
1185
        my $patron = $builder->build_object(
1185
        my $patron = $builder->build_object(
1186
            {
1186
            {
Lines 1238-1244 subtest 'anonymise items_last_borrower' => sub { Link Here
1238
        $item_2->itemlost(1)->store;
1238
        $item_2->itemlost(1)->store;
1239
        $item_3->damaged(1)->store;
1239
        $item_3->damaged(1)->store;
1240
1240
1241
        Koha::Patrons->search_patrons_to_anonymise( { before => '2010-10-12' } )->anonymise_issue_history();
1241
        my $nb_rows = Koha::Patrons->search_patrons_to_anonymise( { before => '2010-10-12' } )->anonymise_issue_history();
1242
        is( $nb_rows, 3, 'anonymise_issue_history should have returned the number of checkouts anonymised');
1242
1243
1243
        my $dbh = C4::Context->dbh;
1244
        my $dbh = C4::Context->dbh;
1244
        my $sth = $dbh->prepare(q|SELECT borrowernumber FROM items_last_borrower where itemnumber = ?|);
1245
        my $sth = $dbh->prepare(q|SELECT borrowernumber FROM items_last_borrower where itemnumber = ?|);
1245
- 

Return to bug 23260