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

--- Comment #47 from Tomás Cohen Arazi (tcohen) <[email protected]> ---
Created attachment 208931
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=208931&action=edit
Bug 23998: (follow-up) Add tests for Koha::Patron::Messages->search_limited

The `search_limited` method was added without tests, and relied on
C4::Context and Koha::Patrons being loaded by someone else.

This patch adds the missing `use` statements and tests covering:

- No logged in user: no restriction
- Logged in user restricted by library groups (ft_hide_patron_info):
  only messages for visible patrons are returned
- Passed search parameters are honored
- `view_borrower_infos_from_any_libraries` lifts the restriction

Test plan:
1. Apply this patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/Koha/Patron/Messages.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Assisted-by: Opus 5.5 (Anthropic)

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to