From a0e166434cdef1654d2f51b6c91bf1ad83910b3d 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 4e1fb2173e..0674686bf9 100644 --- a/t/db_dependent/Koha/Patrons.t +++ b/t/db_dependent/Koha/Patrons.t @@ -1180,7 +1180,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( { @@ -1238,7 +1238,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, 1, '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.11.0