]> 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)
committerJoy Nelson <joy@bywatersolutions.com>
Mon, 10 Feb 2020 23:26:00 +0000 (23:26 +0000)
commit265f0c4041de9a109b0535d7fab3d95fdfcb34a8
tree313f0a1103d273f73ff0ca07ba172dcc3551fcaf
parentb078794fcb1705769dd78e5b156b3def35d7e195
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>
t/db_dependent/api/v1/checkouts.t