Bugzilla – Attachment 173405 Details for
Bug 36822
When creating a new patron via LDAP or Shibboleth 0000-00-00 is inserted for invalid updated_on
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36822: LDAP - Add test
Bug-36822-LDAP---Add-test.patch (text/plain), 1.87 KB, created by
David Nind
on 2024-10-25 18:02:57 UTC
(
hide
)
Description:
Bug 36822: LDAP - Add test
Filename:
MIME Type:
Creator:
David Nind
Created:
2024-10-25 18:02:57 UTC
Size:
1.87 KB
patch
obsolete
>From 3ccd516c74927252827b705ede2401182875e722 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Fri, 25 Oct 2024 14:41:38 +0000 >Subject: [PATCH] Bug 36822: LDAP - Add test > >Signed-off-by: David Nind <david@davidnind.com> >--- > t/db_dependent/Auth_with_ldap.t | 15 ++++++++++++++- > 1 file changed, 14 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Auth_with_ldap.t b/t/db_dependent/Auth_with_ldap.t >index 2b6727100d..450939710f 100755 >--- a/t/db_dependent/Auth_with_ldap.t >+++ b/t/db_dependent/Auth_with_ldap.t >@@ -25,8 +25,10 @@ use t::lib::TestBuilder; > use Test::Warn; > > use C4::Context; >+use C4::Auth; > > use Koha::Patrons; >+use Koha::DateUtils qw( dt_from_string ); > > # Hide all the subrouteine redefined warnings when running this test.. > # We reload the ldap module lots in the test and each reload triggers the >@@ -155,7 +157,7 @@ subtest 'checkpw_ldap tests' => sub { > > subtest 'auth_by_bind = 1 tests' => sub { > >- plan tests => 14; >+ plan tests => 15; > > $auth_by_bind = 1; > >@@ -272,6 +274,14 @@ 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' } )->next; >+ is( $patron_replicated_from_auth->updated_on, dt_from_string()->ymd.' '.dt_from_string()->hms, "updated_on correctly saved on newly created user" ); >+ >+ $patron_replicated_from_auth->delete; >+ > $auth->unmock('ldap_entry_2_hash'); > # end replicate testing > >@@ -499,6 +509,9 @@ sub mockedC4Config { > my $class = shift; > my $param = shift; > >+ if ( $param eq 'useldapserver' ) { >+ return 1; >+ } > if ( $param eq 'useshibboleth' ) { > return 0; > } >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 36822
:
173373
|
173374
|
173375
|
173376
|
173377
|
173385
|
173386
|
173387
|
173388
|
173389
|
173391
|
173392
|
173393
|
173394
|
173395
|
173402
|
173403
|
173404
|
173405
|
173406
|
173646
|
173903
|
173904
|
173905
|
173906
|
173907
|
173908
|
173909
|
174523
|
174525