]> 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)
committerLucas Gass <lucas@bywatersolutions.com>
Fri, 14 Feb 2020 20:39:33 +0000 (20:39 +0000)
commitdea0fd686bde78d836e8b164fa62c70968c156f4
tree8aef7ccf98f50a0d0c6cd939599bbbdb8565f4e0
parent87eb710ad024da8a2018eba6442ed37d76a8bf98
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>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 265f0c4041de9a109b0535d7fab3d95fdfcb34a8)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
t/db_dependent/api/v1/checkouts.t