https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29403

Jonathan Druart <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |29884

--- Comment #58 from Jonathan Druart <[email protected]> ---
(In reply to Marcel de Rooy from comment #48)
> -        t::lib::Dates::compare( $updated_on_got, $updated_on_expected,
> 'updated_on values matched' );
> +        t::lib::Dates::compare(
> +            dt_from_string( $updated_on_got,      'rfc3339' ),
> +            dt_from_string( $updated_on_expected, 'rfc3339' ),
> +            'updated_on values matched'
> +        );
> 
> But what does t::lib::Dates?
> 
> sub compare {
>     my ( $got, $expected ) = @_;
>     my $dt_got      = dt_from_string($got);
>     my $dt_expected = dt_from_string($expected);
>     my $diff = $dt_got->epoch - $dt_expected->epoch;
>     if ( abs($diff) <= 5 ) { return 0 }
>     return $diff > 0 ? 1 : -1;
> }
> 
> So $got en $expected should be strings, right?
> Does this actually show that we miss a parameter in sub compare, and we are
> solving it by twisting the test instead?

Will fix on bug 29884.


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29884
[Bug 29884] Missing test in api/v1/patrons.t
-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to