From 4841611830aff57f6fa99538c7a932f6be33285c Mon Sep 17 00:00:00 2001
From: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Date: Fri, 28 Feb 2020 16:57:56 +0100
Subject: [PATCH] Bug 24757: Leap day failing tests - Fix the tests!

The same day was returned, for a different subtraction.
---
 t/db_dependent/Koha/Patrons.t | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/t/db_dependent/Koha/Patrons.t b/t/db_dependent/Koha/Patrons.t
index 297ed84a9d..26879f8f74 100644
--- a/t/db_dependent/Koha/Patrons.t
+++ b/t/db_dependent/Koha/Patrons.t
@@ -712,8 +712,8 @@ subtest 'get_age' => sub {
         {
             today           => '2020-02-28',
             add_m12_m6_m1   => { date => '2007-08-27', expected_age => 12 },
-            add_m18_0_p1    => { date => '2002-02-28', expected_age => 17 },
-            add_m18_0_0     => { date => '2002-02-28', expected_age => 18 },
+            add_m18_0_p1    => { date => '2002-02-28', expected_age => 18 },
+            add_m18_0_0     => { date => '2002-02-27', expected_age => 18 },
             add_m18_m12_m31 => { date => '2001-01-28', expected_age => 19 },
             add_m18_m12_m30 => { date => '2001-01-29', expected_age => 19 } ,
             add_0_m1_m1     => { date => '2020-01-27', expected_age => 0  },
@@ -792,13 +792,13 @@ subtest 'is_valid_age' => sub {
             add_m5_0_0 =>
               { date => '2015-02-28', expected_age => 5, valid => 1 },
             add_m5_0_p1 =>
-              { date => '2015-02-28', expected_age => 5, valid => 0 },
+              { date => '2015-03-01', expected_age => 5, valid => 0 },
             add_m5_0_m1 =>
               { date => '2015-02-27', expected_age => 5, valid => 1 },
             add_m11_0_0 =>
               { date => '2009-02-28', expected_age => 11, valid => 0 },
             add_m11_0_p1 =>
-              { date => '2009-02-28', expected_age => 11, valid => 1 },
+              { date => '2009-03-01', expected_age => 11, valid => 1 },
             add_m11_0_m1 =>
               { date => '2009-02-27', expected_age => 11, valid => 0 },
         },
-- 
2.20.1