@@ -, +, @@ --- t/db_dependent/Koha/Patrons.t | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --- a/t/db_dependent/Koha/Patrons.t +++ a/t/db_dependent/Koha/Patrons.t @@ -1219,7 +1219,7 @@ subtest 'anonymise items_last_borrower' => sub { t::lib::Mocks::mock_preference('StoreLastBorrower', 1); subtest 'withrawn, lost and damaged items' => sub { - plan tests => 5; + plan tests => 6; my $patron = $builder->build_object( { @@ -1277,7 +1277,8 @@ subtest 'anonymise items_last_borrower' => sub { $item_2->itemlost(1)->store; $item_3->damaged(1)->store; - Koha::Patrons->search_patrons_to_anonymise( { before => '2010-10-12' } )->anonymise_issue_history(); + my $nb_rows = Koha::Patrons->search_patrons_to_anonymise( { before => '2010-10-12' } )->anonymise_issue_history(); + is( $nb_rows, 4, 'anonymise_issue_history should have returned the number of checkouts anonymised'); my $dbh = C4::Context->dbh; my $sth = $dbh->prepare(q|SELECT borrowernumber FROM items_last_borrower where itemnumber = ?|); --