@@ -, +, @@ --------- -- this should bomb horribly. -- this should succeed. --- t/db_dependent/Serials/GetNextDate.t | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) --- a/t/db_dependent/Serials/GetNextDate.t +++ a/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'); --