https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34489
Bug ID: 34489
Summary: Koha/Patrons.t: Run get_age and is_valid_age in UTC
Change sponsored?: ---
Product: Koha
Version: master
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P5 - low
Component: Test Suite
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
Running in Amsterdam TZ gives:
# Subtest: get_age
not ok 5 - Today=2020-02-28, dob=2004-02-28, should be 16
# Failed test 'Today=2020-02-28, dob=2004-02-28, should be 16'
# at t/db_dependent/Koha/Patrons.t line 814.
# got: '15'
# expected: '16'
not ok 9 - Today=2020-02-28, dob=2002-02-28, should be 18
not ok 16 - Today=2020-02-29, dob=2004-02-29, should be 16
not ok 19 - Today=2020-03-01, dob=2002-03-01, should be 18
not ok 23 - Today=2020-03-01, dob=2004-03-01, should be 16
not ok 25 - Today=2019-01-31, dob=2001-01-31, should be 18
not ok 28 - Today=2019-01-31, dob=2003-01-31, should be 16
# Looks like you failed 7 tests of 31.
not ok 18 - get_age
# Subtest: is_valid_age
not ok 2 - Today=2020-02-28, dob=2009-02-28, is 11, should be valid=0 in
category AGE_5_10
# Failed test 'Today=2020-02-28, dob=2009-02-28, is 11, should be valid=0
in category AGE_5_10'
# at t/db_dependent/Koha/Patrons.t line 893.
# got: '1'
# expected: '0'
not ok 7 - Today=2020-02-28, dob=2015-02-28, is 5, should be valid=1 in
category AGE_5_10
# Failed test 'Today=2020-02-28, dob=2015-02-28, is 5, should be valid=1
in category AGE_5_10'
# at t/db_dependent/Koha/Patrons.t line 893.
# got: '0'
# expected: '1'
# Looks like you failed 2 tests of 10.
not ok 19 - is_valid_age
Adding a tzset to UTC in the test as a workaround. Bug 25621 suggests patching
DateUtils.pm as a definitive solution?
--
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/