[Koha-bugs] [Bug 25113] Make CirculationRules.t flexible for new scope combinations
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Mon Aug 24 12:01:44 CEST 2020
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25113
Jonathan Druart <jonathan.druart at bugs.koha-community.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #108963|0 |1
is obsolete| |
--- Comment #7 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
Created attachment 108978
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=108978&action=edit
Bug 25113: Refactor CirculationRules.t when testing scope combinations
We used to test rule scopes by explicitly defining each combination.
When adding new scopes, it is much easier if these tests are auto-
generated for you so that you don't have to repeat similar code.
This patch removes those "duplicates" and adds a method that returns
test cases for each scope as follows:
branchcode categorycode itemtype
__________ ____________ ________
branchcode categorycode itemtype
branchcode categorycode *
branchcode * itemtype
branchcode * *
* categorycode itemtype
* categorycode *
* * itemtype
* * *
And automatically extends the test when new scopes are added.
This also obsoletes the "Get effective issuing rule in correct order"
test in t/db_dependent/Koha/IssuingRules.t
To test:
1. prove t/db_dependent/Koha/CirculationRules.t
Sponsored-by: The National Library of Finland
Signed-off-by: Joonas Kylmälä <joonas.kylmala at helsinki.fi>
Signed-off-by: Katrin Fischer <katrin.fischer.83 at web.de>
JD amended patch: perl tidy
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list