[Koha-bugs] [Bug 20866] ArticleRequests.t fails on existing requests

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Jun 4 21:33:36 CEST 2018


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20866

Katrin Fischer <katrin.fischer at bsz-bw.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #75750|0                           |1
        is obsolete|                            |
  Attachment #75784|0                           |1
        is obsolete|                            |

--- Comment #5 from Katrin Fischer <katrin.fischer at bsz-bw.de> ---
Created attachment 75791
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75791&action=edit
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 at web.de>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list