Summary: | Circulation.t fails on 'AddRenewal left both fines' | ||
---|---|---|---|
Product: | Koha | Reporter: | Emmi Takkinen <emmi.takkinen> |
Component: | Test Suite | Assignee: | Emmi Takkinen <emmi.takkinen> |
Status: | CLOSED FIXED | QA Contact: | Kyle M Hall (khall) <kyle> |
Severity: | minor | ||
Priority: | P5 - low | CC: | andrew, fridolin.somers, jonathan.druart, kyle, tomascohen, victor |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
21.05.00,20.11.06,20.05.12
|
|
Circulation function: | |||
Attachments: |
Bug 26405: Prevent Circulation.t failing on 'AddRenewal left both fines'
Bug 26405: Prevent Circulation.t failing on 'AddRenewal left both fines' Bug 26405: Prevent Circulation.t failing on 'AddRenewal left both fines' |
Description
Emmi Takkinen
2020-09-08 12:58:33 UTC
Yes, we could mock the pref. Can you provide a patch please? Created attachment 114135 [details] [review] Bug 26405: Prevent Circulation.t failing on 'AddRenewal left both fines' Bug 23051 added option to skip calculating fines even when "CalculateFinesOnReturn" is enabled. Due this Circulation.t fails on test "AddRenewal left both fines" if "CalculateFinesOnReturn" is disabled on ones system. Mocking syspref while testing fixes failig tests. To test: 1. Disable "CalculateFinesOnReturn". 2. Run prove t/db_dependent/Circulation.t => Tests fail 3. Apply patch. 4. Run prove t/db_dependent/Circulation.t again => Tests are succesful Created attachment 118342 [details] [review] Bug 26405: Prevent Circulation.t failing on 'AddRenewal left both fines' Bug 23051 added option to skip calculating fines even when "CalculateFinesOnReturn" is enabled. Due this Circulation.t fails on test "AddRenewal left both fines" if "CalculateFinesOnReturn" is disabled on ones system. Mocking syspref while testing fixes failig tests. To test: 1. Disable "CalculateFinesOnReturn". 2. Run prove t/db_dependent/Circulation.t => Tests fail 3. Apply patch. 4. Run prove t/db_dependent/Circulation.t again => Tests are succesful Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Good catch. Those tests do not cover the case in which the syspref is set. But I believe this is tested in t/db_dependent/Circulation/Returns.t (somehow). Created attachment 120122 [details] [review] Bug 26405: Prevent Circulation.t failing on 'AddRenewal left both fines' Bug 23051 added option to skip calculating fines even when "CalculateFinesOnReturn" is enabled. Due this Circulation.t fails on test "AddRenewal left both fines" if "CalculateFinesOnReturn" is disabled on ones system. Mocking syspref while testing fixes failig tests. To test: 1. Disable "CalculateFinesOnReturn". 2. Run prove t/db_dependent/Circulation.t => Tests fail 3. Apply patch. 4. Run prove t/db_dependent/Circulation.t again => Tests are succesful Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Pushed to master for 21.05, thanks to everybody involved! Pushed to 20.11.x for 20.11.06 Pushed to 20.05.x for 20.05.12 Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed. |