As the title says, Koha/Patrons.t fails for get_age and is_valid_age when run on Feb 28th in a leap year.
Created attachment 99861 [details] [review] Bug 24757: Leap day failing tests - It's like we are on 2020-02-28 Those tests were failing on 2020-02-28, next day was a leap day. Let's fake time and recreate the failure
Created attachment 99862 [details] [review] Bug 24757: Leap day failing tests - refactoring Refactore the tests to add more of them after we fixed the failing ones.
Created attachment 99863 [details] [review] Bug 24757: Leap day failing tests - Fix the tests! The same day was returned, for a different subtraction.
Created attachment 99864 [details] [review] Bug 24757: Add more tests Now we want to make sure we are not missing another situation.
Created attachment 99865 [details] [review] Bug 24757: Leap day failing tests - It's like we are on 2020-02-28 Those tests were failing on 2020-02-28, next day was a leap day. Let's fake time and recreate the failure Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 99866 [details] [review] Bug 24757: Leap day failing tests - refactoring Refactore the tests to add more of them after we fixed the failing ones. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 99867 [details] [review] Bug 24757: Leap day failing tests - Fix the tests! The same day was returned, for a different subtraction. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 99868 [details] [review] Bug 24757: Add more tests Now we want to make sure we are not missing another situation. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Code all makes sense, thanks for the diligent and clear working through it. Passing QA
Nice work everyone! Pushed to master for 20.05
Created attachment 99982 [details] [review] Bug 24757: (RM follow-up) Restore test count Somehow we lost a '0' on the test count for t/db_dependent/Koha/Patrons.t Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
enhancement not backported to 19.11.x