Summary: | Implement Koha::Patron->is_anonymous (was t/db_dependent/Auth.t generates warnings) | ||
---|---|---|---|
Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
Component: | Test Suite | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | RESOLVED FIXED | QA Contact: | Martin Renvoize (ashimema) <martin.renvoize> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | david, fridolin.somers, martin.renvoize |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | Small patch | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: |
25.11.00,25.05.02
|
Circulation function: | |
Bug Depends on: | 40353 | ||
Bug Blocks: | 40444 | ||
Attachments: |
Bug 40401: Implement Koha::Patron->is_anonymous
Bug 40401: Implement Koha::Patron->is_anonymous Bug 40401: Implement Koha::Patron->is_anonymous Bug 40401: (follow-up) Fix grammar and rollback in tests |
Description
Jonathan Druart
2025-07-16 07:46:45 UTC
Created attachment 184123 [details] [review] Bug 40401: Implement Koha::Patron->is_anonymous The first motivation of this patch is to remove the following warnings from t/db_dependent/Auth.t: Use of uninitialized value $anonymous_patron in string eq at /kohadevbox/koha/C4/Auth.pm line 1497 Actually a correct fix seems to add a new `is_anonymous` method to Koha::Patron in order to remove the warnings from everywhere else. Test plan: Confirm that you cannot log in using the anonymous patron and that the 2 tests are passing prove t/db_dependent/Auth.t t/db_dependent/Koha/Patron.t Created attachment 184294 [details] [review] Bug 40401: Implement Koha::Patron->is_anonymous The first motivation of this patch is to remove the following warnings from t/db_dependent/Auth.t: Use of uninitialized value $anonymous_patron in string eq at /kohadevbox/koha/C4/Auth.pm line 1497 Actually a correct fix seems to add a new `is_anonymous` method to Koha::Patron in order to remove the warnings from everywhere else. Test plan: Confirm that you cannot log in using the anonymous patron and that the 2 tests are passing prove t/db_dependent/Auth.t t/db_dependent/Koha/Patron.t Signed-off-by: David Nind <david@davidnind.com> Created attachment 184353 [details] [review] Bug 40401: Implement Koha::Patron->is_anonymous The first motivation of this patch is to remove the following warnings from t/db_dependent/Auth.t: Use of uninitialized value $anonymous_patron in string eq at /kohadevbox/koha/C4/Auth.pm line 1497 Actually a correct fix seems to add a new `is_anonymous` method to Koha::Patron in order to remove the warnings from everywhere else. Test plan: Confirm that you cannot log in using the anonymous patron and that the 2 tests are passing prove t/db_dependent/Auth.t t/db_dependent/Koha/Patron.t Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Created attachment 184354 [details] [review] Bug 40401: (follow-up) Fix grammar and rollback in tests - Fixed grammar: "Returns true if the patron is the anonymous patron" - Fixed test cleanup: use txn_rollback instead of txn_begin - Fixed test subroutine closure syntax Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Nice work everyone! Pushed to main for 25.11 Nice work everyone! Pushed to 25.05.x Enhancement not pushed to 24.11.x Test suite changes, no changes to the manual required. |