Bugzilla – Attachment 99868 Details for
Bug 24757
t/db_dependent/Koha/Patrons.t get_age fails on February 28 in a Leap Year
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24757: Add more tests
Bug-24757-Add-more-tests.patch (text/plain), 4.03 KB, created by
Martin Renvoize (ashimema)
on 2020-03-02 10:05:52 UTC
(
hide
)
Description:
Bug 24757: Add more tests
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-03-02 10:05:52 UTC
Size:
4.03 KB
patch
obsolete
>From 2d49d54ff4660b3ee2ccbfdb8cbbf10e277ebc68 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 28 Feb 2020 17:14:25 +0100 >Subject: [PATCH] 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> >--- > t/db_dependent/Koha/Patrons.t | 49 +++++++++++++++++++++++++++++------ > 1 file changed, 41 insertions(+), 8 deletions(-) > >diff --git a/t/db_dependent/Koha/Patrons.t b/t/db_dependent/Koha/Patrons.t >index 26879f8f74..a275f03c0a 100644 >--- a/t/db_dependent/Koha/Patrons.t >+++ b/t/db_dependent/Koha/Patrons.t >@@ -703,20 +703,53 @@ subtest 'get_routing_lists' => sub { > }; > > subtest 'get_age' => sub { >- plan tests => 7; >+ plan tests => 31; > > my $patron = $builder->build( { source => 'Borrower' } ); > $patron = Koha::Patrons->find( $patron->{borrowernumber} ); > > my @dates = ( > { >- 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 => 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 }, >+ today => '2020-02-28', >+ has_12 => { date => '2007-08-27', expected_age => 12 }, >+ almost_18 => { date => '2002-03-01', expected_age => 17 }, >+ has_18_today => { date => '2002-02-28', expected_age => 18 }, >+ had_18_yesterday => { date => '2002-02-27', expected_age => 18 }, >+ almost_16 => { date => '2004-02-29', expected_age => 15 }, >+ has_16_today => { date => '2004-02-28', expected_age => 16 }, >+ had_16_yesterday => { date => '2004-02-27', expected_age => 16 }, >+ new_born => { date => '2020-01-27', expected_age => 0 }, >+ }, >+ { >+ today => '2020-02-29', >+ has_12 => { date => '2007-08-27', expected_age => 12 }, >+ almost_18 => { date => '2002-03-01', expected_age => 17 }, >+ has_18_today => { date => '2002-02-28', expected_age => 18 }, >+ had_18_yesterday => { date => '2002-02-27', expected_age => 18 }, >+ almost_16 => { date => '2004-03-01', expected_age => 15 }, >+ has_16_today => { date => '2004-02-29', expected_age => 16 }, >+ had_16_yesterday => { date => '2004-02-28', expected_age => 16 }, >+ new_born => { date => '2020-01-27', expected_age => 0 }, >+ }, >+ { >+ today => '2020-03-01', >+ has_12 => { date => '2007-08-27', expected_age => 12 }, >+ almost_18 => { date => '2002-03-02', expected_age => 17 }, >+ has_18_today => { date => '2002-03-01', expected_age => 18 }, >+ had_18_yesterday => { date => '2002-02-28', expected_age => 18 }, >+ almost_16 => { date => '2004-03-02', expected_age => 15 }, >+ has_16_today => { date => '2004-03-01', expected_age => 16 }, >+ had_16_yesterday => { date => '2004-02-29', expected_age => 16 }, >+ }, >+ { >+ today => '2019-01-31', >+ has_12 => { date => '2006-08-27', expected_age => 12 }, >+ almost_18 => { date => '2001-02-01', expected_age => 17 }, >+ has_18_today => { date => '2001-01-31', expected_age => 18 }, >+ had_18_yesterday => { date => '2001-01-30', expected_age => 18 }, >+ almost_16 => { date => '2003-02-01', expected_age => 15 }, >+ has_16_today => { date => '2003-01-31', expected_age => 16 }, >+ had_16_yesterday => { date => '2003-01-30', expected_age => 16 }, > }, > ); > >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 24757
:
99861
|
99862
|
99863
|
99864
|
99865
|
99866
|
99867
| 99868 |
99982