Browse Source
The current test for still-active contracts fails because it was written with fixed dates, which already passed :-D This patch calculates the current date, and uses it to generate a future one, so the tests serve their purpose no matter what the current date is. To test: - Run: $ prove t/db_dependent/Contract.t => FAIL: activeonly compares contractenddate with now(), and fails because a fixed 2015-07-31 is writteng on the test data - Apply the patch - Run: $ prove t/db_dependent/Contract.t => SUCCESS: the sample data has been calculated using the current date and the tests pass. - Sign off :-D Edit: added missing use DateTime::Duration, Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>3.22.x
Tomas Cohen Arazi
9 years ago
1 changed files with 8 additions and 2 deletions
Loading…
Reference in new issue