View | Details | Raw Unified | Return to bug 36822
Collapse All | Expand All

(-)a/t/db_dependent/Auth_with_ldap.t (-2 / +17 lines)
Lines 25-32 use t::lib::TestBuilder; Link Here
25
use Test::Warn;
25
use Test::Warn;
26
26
27
use C4::Context;
27
use C4::Context;
28
use C4::Auth;
28
29
29
use Koha::Patrons;
30
use Koha::Patrons;
31
use Koha::DateUtils qw( dt_from_string );
30
32
31
# Hide all the subrouteine redefined warnings when running this test..
33
# Hide all the subrouteine redefined warnings when running this test..
32
# We reload the ldap module lots in the test and each reload triggers the
34
# We reload the ldap module lots in the test and each reload triggers the
Lines 155-161 subtest 'checkpw_ldap tests' => sub { Link Here
155
157
156
    subtest 'auth_by_bind = 1 tests' => sub {
158
    subtest 'auth_by_bind = 1 tests' => sub {
157
159
158
        plan tests => 14;
160
        plan tests => 15;
159
161
160
        $auth_by_bind = 1;
162
        $auth_by_bind = 1;
161
163
Lines 272-277 subtest 'checkpw_ldap tests' => sub { Link Here
272
        $patron->delete;
274
        $patron->delete;
273
        $replicate = 0;
275
        $replicate = 0;
274
        $welcome   = 0;
276
        $welcome   = 0;
277
278
        # replicate testing with checkpw
279
        C4::Auth::checkpw( 'hola', password => 'hey' );
280
        my $patron_replicated_from_auth = Koha::Patrons->search( { userid => 'hola' } )->next;
281
        is(
282
            $patron_replicated_from_auth->updated_on, dt_from_string()->ymd . ' ' . dt_from_string()->hms,
283
            "updated_on correctly saved on newly created user"
284
        );
285
286
        $patron_replicated_from_auth->delete;
287
275
        $auth->unmock('ldap_entry_2_hash');
288
        $auth->unmock('ldap_entry_2_hash');
276
        # end replicate testing
289
        # end replicate testing
277
290
Lines 499-504 sub mockedC4Config { Link Here
499
    my $class = shift;
512
    my $class = shift;
500
    my $param = shift;
513
    my $param = shift;
501
514
515
    if ( $param eq 'useldapserver' ) {
516
        return 1;
517
    }
502
    if ( $param eq 'useshibboleth' ) {
518
    if ( $param eq 'useshibboleth' ) {
503
        return 0;
519
        return 0;
504
    }
520
    }
505
- 

Return to bug 36822