[Koha-bugs] [Bug 14693] t/db_dependent/Contract.t fails do to fixed date

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Aug 20 12:58:40 CEST 2015


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14693

--- Comment #2 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
Comment on attachment 41682
  --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41682
Bug 14693: Contract.t should generate dates based on current date

Review of attachment 41682:
 --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=14693&attachment=41682)
-----------------------------------------------------------------

::: t/db_dependent/Contract.t
@@ +72,5 @@
>  is( $contract->{contractdescription}, $my_contract1->{contractdescription}, 'AddContract stores the contract description correctly.' );
>  is( $contract->{booksellerid}, $my_contract1->{booksellerid}, 'AddContract stores the bookseller id correctly.' );
>  
> +my $now = dt_from_string;
> +my $three_more_days = $now + DateTime::Duration->new( days => 3 );

1/ DateTime::Duration should be imported
2/ Are you sure this works ? There are the 2 add_duration or subtract_duration
methods, which is certainly better.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list