[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
Thu Sep 23 08:21:29 CEST 2021


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

Marcel de Rooy <m.de.rooy at rijksmuseum.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #125152|0                           |1
        is obsolete|                            |

--- Comment #80 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
Created attachment 125179
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125179&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>

Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>

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


More information about the Koha-bugs mailing list