From 0e4dcde80a08bdabe7b18dc23b0d8ab06b6eb8b9 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 29 Jan 2020 10:07:03 +0100 Subject: [PATCH] Bug 23260: Add a new test --- t/db_dependent/Koha/Patrons.t | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/t/db_dependent/Koha/Patrons.t b/t/db_dependent/Koha/Patrons.t index 8cdfc0df20..f50b5f1a39 100755 --- a/t/db_dependent/Koha/Patrons.t +++ b/t/db_dependent/Koha/Patrons.t @@ -1220,7 +1220,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( { @@ -1278,7 +1278,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 = ?|); -- 2.20.1