]> git.koha-community.org Git - koha.git/commit
Bug 18936: Fix some more tests
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 22 Jan 2020 11:27:22 +0000 (12:27 +0100)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 4 Feb 2020 09:56:27 +0000 (09:56 +0000)
commit25848e5af3ecd77a1a16580aee671c5fb6da7fcb
tree65d448e12ddbe2218bc638c214b1e06a5248c4ad
parente4dfe623d9b4db17beeb4b14ca329e503c99b225
Bug 18936: Fix some more tests

* CanItemBeReserved
Prior to "Bug 18936: Convert issuingrules fields to circulation_rules",
GetHoldRule returned holds_per_record even if no reservesallowed was
defined. This change restores this behavior.
FIXME Note: In GetHoldRule we return itemtype only if reservesallowed is set,
not sure it is correct.

* t/db_dependent/Holds/DisallowHoldIfItemsAvailable.t
When setting returnbranch, holdallowed and hold_fulfillment_policy, we
should not provide categorycode.

* t/db_dependent/Holds.t
Prefer to keep the existing rules instead of removing them. It got quite
hard to understand what was going on here because of the mixup with
the rule reservesallowed that was in issuingrules, and the other rules
we used for the tests. Also, categorycode should not be passed to set
those 3 rules (holdallowed, hold_fulfillment_policy and returnbranch)

* t/db_dependent/Circulation.t
Setting lengthunit to 'hours', no need to make sure the rule has been
correctly be saved

* t/db_dependent/Circulation/CalcDateDue.t
It uses hardcoded data that is not in the sample data (categorycode=C).
Let use K that exists and postpone a refactore of the whole script (to
make it create the data it needs).

* t/db_dependent/Circulation/ReturnClaims.t
* t/db_dependent/Circulation/IssuingRules/maxsuspensiondays.t
Simple replace Koha::IssuingRule with Koha::CirculationRules

* t/db_dependent/Koha/Charges/Fees.t
=> FIXME Still failing, stuck here, need help

Signed-off-by: Minna Kivinen <minna.kivinen@hamk.fi>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
C4/Reserves.pm
t/db_dependent/Circulation.t
t/db_dependent/Circulation/CalcDateDue.t
t/db_dependent/Circulation/IssuingRules/maxsuspensiondays.t
t/db_dependent/Circulation/ReturnClaims.t
t/db_dependent/Holds.t
t/db_dependent/Holds/DisallowHoldIfItemsAvailable.t
t/db_dependent/Koha/Charges/Fees.t