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

--- Comment #6 from Martin Renvoize (ashimema) 
<[email protected]> ---
Created attachment 206018
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=206018&action=edit
Bug 43375: (QA follow-up) Add test coverage for form-data fallback in userinfo
parsing

_get_data_and_patron() falls back to Mojo::Parameters form-data
parsing whenever $tx->res->json fails to decode the userinfo
response body. That branch was untested: all existing userinfo_url
subtests mock json() to return a hashref, so the fallback path was
never actually exercised.

This adds a subtest that mocks a genuine url-encoded response body
(json() returning undef) and confirms the fallback still maps data
and finds the matching patron correctly.

Test plan:
1. Run:
   $ ktd --shell
  k$ prove t/db_dependent/Koha/Auth/Client/OAuth.t
=> SUCCESS: All 6 subtests pass, including the new fallback-path test
2. Sign off

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Signed-off-by: Martin Renvoize <[email protected]>

-- 
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