[Koha-bugs] [Bug 27945] Limit the number of active article requests per patron category

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Sep 22 17:12:15 CEST 2021


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

--- Comment #77 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
Created attachment 125152
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125152&action=edit
Bug 27945: (QA follow-up) Fix and move tests to proper file

Koha::Patron methods tests belong to the t/db_dependent/Koha/Patron.t
tests file.

This patch moves the tests, and also acknowledges the fact that we can
use Test::Exception instead of a try/catch block. It also fixes the
tests so they actually trigger the ->request method, which is the one
that raises the exception if the limit is reached.

At some point, because of the dependency mess, this bug ended up with
the exception throwing in the wrong method, and that's why tests were
also failing.

To test:
1. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Patron.t \
           t/db_dependent/ArticleRequests.t
=> FAIL: Patron.t passes, ArticleRequests.t doesn't
2. Apply this patch
3. Repeat 1
=> SUCCESS: Both pass!
4. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen at theke.io>

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


More information about the Koha-bugs mailing list