From 2119e88bbdf1073a69543a5d8881e9dfa876a7a7 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Mon, 4 Jun 2018 10:26:01 +0200 Subject: [PATCH] Bug 20866: Fix ArticleRequests.t when table contains records Content-Type: text/plain; charset=utf-8 Subtest search_limited fails. Assumptions in that code may not be true. Simple fix for now: clear the table at the start. Test plan: [1] Create an article request. [2] Run t/db_dependent/ArticleRequests.t Signed-off-by: Marcel de Rooy --- t/db_dependent/ArticleRequests.t | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/ArticleRequests.t b/t/db_dependent/ArticleRequests.t index 7c99657..4cd5109 100755 --- a/t/db_dependent/ArticleRequests.t +++ b/t/db_dependent/ArticleRequests.t @@ -78,7 +78,9 @@ ok( $patron->id, 'Koha::Patron created' ); my $patron_2 = $builder->build({ source => 'Borrower', value => { flags => 0 } }); $patron_2 = Koha::Patrons->find( $patron_2->{borrowernumber} ); -my $nb_article_requests = Koha::ArticleRequests->count; +# Clear current article requests +Koha::ArticleRequests->delete; +my $nb_article_requests = 0; # store Koha::Notice::Messages->delete; -- 2.1.4