]> 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)
committerAleisha Amohia <aleishaamohia@hotmail.com>
Wed, 24 Jan 2024 10:15:08 +0000 (10:15 +0000)
commit761f32d2383b75edc5bf8ab1df99125f13ddaa1c
tree7e00d148e323c542b1c2cdf6df30e90e87fd801b
parent838798b23f6b55cf4b97f9f561061d031b317e4d
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: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
C4/Auth.pm
t/db_dependent/Auth.t