Summary: | Koha/Patron/Categories.t is failing on March 1st (2019 only?) and Feb 29th 2024 | ||
---|---|---|---|
Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
Component: | Test Suite | Assignee: | Chris Cormack <chris> |
Status: | NEW --- | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | martin.renvoize |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22443 | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
Bug 22446: Add tests to highlight the problem
Bug 22446: Explicitely list what we expect to avoid ambiguity |
Description
Jonathan Druart
2019-03-02 00:35:52 UTC
Created attachment 85952 [details] [review] Bug 22446: Add tests to highlight the problem Created attachment 86011 [details] [review] Bug 22446: Explicitely list what we expect to avoid ambiguity This is a duplicate of bug 22443. However here I suspect a bug in ->get_expiry_date, not a calculation problem in tests. Comment on attachment 86011 [details] [review] Bug 22446: Explicitely list what we expect to avoid ambiguity Review of attachment 86011 [details] [review]: ----------------------------------------------------------------- ::: t/db_dependent/Koha/Patron/Categories.t @@ +110,3 @@ > Time::Fake->offset( $dt->epoch ); > > + my $next_month = dt_from_string($date->{next_month}, 'iso'); I think I found that $next_month was not actually used anywhere.. be nice to do a little housekeeping whilst in here. I actually prefer hard-coding these dates for tests as you have done here.. our Koha code relies on DateTime maths so by relying on the same DateTime maths in the test we were realistically just testing DateTime against DateTime so wouldn't have picked up breaking changes in the parent library. *** Bug 22443 has been marked as a duplicate of this bug. *** *** Bug 33107 has been marked as a duplicate of this bug. *** Today, Feb 29th 2024 t/db_dependent/Koha/Patron/Categories.t .. 1/10 # Failed test 'With enrolmentperiod defined and no parameter, ->get_expiry_date should return today + enrolmentperiod' # at t/db_dependent/Koha/Patron/Categories.t line 88. # got: '-1' # expected: '0' # Looks like you failed 1 test of 7. # Failed test 'get_expiry_date' # at t/db_dependent/Koha/Patron/Categories.t line 103. t/db_dependent/Koha/Patrons/Import.t .. 176/178 # Failed test 'Expiration date is correct with update_dateexpiry = true no dateexpiry in file and update_dateexpiryfromtoday false (i.e. use passed dateenrolled) ' # at t/db_dependent/Koha/Patrons/Import.t line 1202. # got: '2025-08-28' # expected: '2025-08-29' # Looks like you failed 1 test of 3. # Failed test 'test update_dateexpiry when no dateexpiry in file' # at t/db_dependent/Koha/Patrons/Import.t line 1234. |