]> git.koha-community.org Git - koha.git/commit
Bug 34893: Unit tests for C4::Auth::checkpw
authorTomas Cohen Arazi <tomascohen@theke.io>
Fri, 15 Dec 2023 13:54:11 +0000 (10:54 -0300)
committerKatrin Fischer <katrin.fischer@bsz-bw.de>
Fri, 2 Feb 2024 16:31:48 +0000 (17:31 +0100)
commit12b6c0e67d39590da23a614fbe6d4aa4f18923aa
tree9db68760f77d277b8bc5e0cf62be1a9ceb6234fe
parent2b54d3c82b5e6762f75f35b7fb21bcd96f5bc116
Bug 34893: Unit tests for C4::Auth::checkpw

This patch introduces some tests on the current (and new) behavior for
the `checkpw` function.

I needed it to better understand if an edge case was actually possible
(it wasn't).

Found a really minor annoyance for the internal check with expired
password not returning the $patron object for consistency with the other
use cases.

I think this method deserves (at least) changing the return value to a
sane data structure. But that's not target for backporting to stable
releases. So a separate bug.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
C4/Auth.pm
t/db_dependent/Auth.t