From 96603fff73a10dc445f9602c17765801d0f6feab Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Fri, 25 Oct 2024 14:41:38 +0000 Subject: [PATCH] Bug 36822: LDAP - Add test Co-authored-by: Martin Renvoize --- t/db_dependent/Auth_with_ldap.t | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/t/db_dependent/Auth_with_ldap.t b/t/db_dependent/Auth_with_ldap.t index 2b6727100d..4f6962b1f5 100755 --- a/t/db_dependent/Auth_with_ldap.t +++ b/t/db_dependent/Auth_with_ldap.t @@ -25,6 +25,7 @@ use t::lib::TestBuilder; use Test::Warn; use C4::Context; +use C4::Auth; use Koha::Patrons; @@ -272,6 +273,12 @@ subtest 'checkpw_ldap tests' => sub { $patron->delete; $replicate = 0; $welcome = 0; + + # replicate testing with checkpw + C4::Auth::checkpw( 'hola', password => 'hey' ); + my $patron_replicated_from_Auth = Koha::Patrons->search( { userid => 'hola' } ); + $patron_replicated_from_Auth->delete; + $auth->unmock('ldap_entry_2_hash'); # end replicate testing @@ -499,6 +506,9 @@ sub mockedC4Config { my $class = shift; my $param = shift; + if ( $param eq 'useldapserver' ) { + return 1; + } if ( $param eq 'useshibboleth' ) { return 0; } -- 2.39.5