Bugzilla – Attachment 38467 Details for
Bug 14036
"Date::Calc::Add_Delta_YM(): not a valid date" error when accessing subscription detail
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14036 - GetNextDate.t lacking test cases.
Bug-14036---GetNextDatet-lacking-test-cases.patch (text/plain), 1.64 KB, created by
Mark Tompsett
on 2015-04-23 19:53:07 UTC
(
hide
)
Description:
Bug 14036 - GetNextDate.t lacking test cases.
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2015-04-23 19:53:07 UTC
Size:
1.64 KB
patch
obsolete
>From 680bee9550b77fe6549171c63a10bfea9ae323fc Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Tue, 21 Apr 2015 21:46:32 -0400 >Subject: [PATCH] Bug 14036 - GetNextDate.t lacking test cases. > >Two test cases were added to improve testing. This catches the >problem encountered by Rolando Isidoro. > >TEST PLAN >--------- >1) Apply this test patch first. >2) prove t/db_dependent/Serials/GetNextDate.t > -- this should bomb horribly. >3) Apply the other patch. >4) prove t/db_dependent/Serials/GetNextDate.t > -- this should succeed. >5) koha qa test tools > >Signed-off-by: Mark Tompsett <mtompset@hotmail.com> >--- > t/db_dependent/Serials/GetNextDate.t | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/Serials/GetNextDate.t b/t/db_dependent/Serials/GetNextDate.t >index 1572d0a..db03ff4 100644 >--- a/t/db_dependent/Serials/GetNextDate.t >+++ b/t/db_dependent/Serials/GetNextDate.t >@@ -1,7 +1,7 @@ > #!/usr/bin/perl > > use C4::Context; >-use Test::More tests => 86; >+use Test::More tests => 88; > use Modern::Perl; > > my $dbh = C4::Context->dbh; >@@ -26,7 +26,14 @@ my $subscription = { > irregularity => '', > countissuesperunit => 1, > }; >-my $publisheddate = $subscription->{firstacquidate}; >+ >+my $publisheddate = GetNextDate($subscription, '0000-00-00'); >+is($publisheddate, undef, "0000-00-00 is an expected undef date."); >+ >+$publisheddate = GetNextDate($subscription, '9999-99-99'); >+is($publisheddate, undef, "9999-99-99 is an expected undef date."); >+ >+$publisheddate = $subscription->{firstacquidate}; > > $publisheddate = GetNextDate($subscription, $publisheddate); > is($publisheddate, '1970-01-02'); >-- >1.9.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 14036
:
38399
|
38459
|
38461
|
38464
|
38465
|
38466
| 38467 |
38468