]> git.koha-community.org Git - koha.git/commit
Bug 20866: Make ArticleRequests.t pass even if table is not empty
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 4 Jun 2018 18:28:02 +0000 (15:28 -0300)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Mon, 11 Jun 2018 08:56:10 +0000 (09:56 +0100)
commite5f052ac1c81899db10c465c585b890949983828
treefbb4e9723ff02eb22a220386a54b5775d664fd23
parent183e10c13f6366b29dd79a7a9549f7d105d73f73
Bug 20866: Make ArticleRequests.t pass even if table is not empty

Previous patch from Marcel removed the data from article_requests, I do
not think it is a good idea to remove existing data, it could hide bugs.

This patch moves the count inside the subtest block in order to have the
correct value when these tests are executed.
Previous code was broken: Koha::Patron->store does not generate a
userid, and ->search_limited did not work correctly
(Koha::Patron->has_permission returned early because of the non-existing
userid, 'return unless $self->userid;');

Test plan:
[1] Create an article request.
[2] Run t/db_dependent/ArticleRequests.t

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
t/db_dependent/ArticleRequests.t