]> 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)
committerLucas Gass <lucas@bywatersolutions.com>
Wed, 24 Jan 2024 17:33:44 +0000 (17:33 +0000)
commit6dbcc0f7e475efa782d1d5f04daf84bfd299dc34
tree41b839326189e026e7d49aa5b4ed291de6ba6696
parent11e2e86da62809bc46908df6f89ebd00d9cbaa03
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: Lucas Gass <lucas@bywatersolutions.com>
C4/Auth.pm
t/db_dependent/Auth.t