_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 <noreply@anthropic.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk> |
||
|---|---|---|
| .. | ||
| OAuth.t | ||