]> 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)
committerFrédéric Demians <f.demians@tamil.fr>
Fri, 26 Jan 2024 08:57:32 +0000 (09:57 +0100)
commit6073aed054cb77b3cf9358655b31ff71743a06dc
tree6dee53566e3b13c970049dc2a904b609f71f07e7
parentba6210d851e6d3931b51afd1d9b6c981eef98728
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>
(cherry picked from commit 5476b18e7ea34e08d9dd163e2c446d5b223cf032)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 76bda46ad5a4916aa907f2eb11f81eaaedf19f37)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
C4/Auth.pm
t/db_dependent/Auth.t