]> git.koha-community.org Git - koha.git/commit
Bug 24543: Fix wrong test in api/v1/checkouts.t
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 30 Jan 2020 10:51:25 +0000 (11:51 +0100)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Thu, 30 Jan 2020 15:35:35 +0000 (15:35 +0000)
commitbc05a90aa78ca014d22d9c5c67058220e541fdc4
tree0a9d0d6852a5ce30d55d2856f416d258135f5129
parentfd1ade2a6768cd845ebefce471883a2d7555f6fd
Bug 24543: Fix wrong test in api/v1/checkouts.t

In t/db_dependent/api/v1/checkouts.t we define a circulation rule with renewalperiod=7.
But then the expected due date is today+14 days.
However, at the beginning of the script, the due_date of the issue is today+14 days.

That highlight that the renewal period is not taken into account.

The circulation rule is created with renewalperiod and renewalsallowed,
however GetLoanLength check the existence of issuelength to return the rule.
GetLoanLength finally return the default rule, with renewalperiod=0

Note that this has been found working on bug 18936, code will be cleaned on that patchset.

Test plan:
 % prove t/db_dependent/api/v1/checkouts.t
must return green before and after this patch

Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
t/db_dependent/api/v1/checkouts.t