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

(-)a/t/db_dependent/Auth_with_ldap.t (-2 / +17 lines)
Lines 84-90 subtest "checkpw_ldap tests" => sub { Link Here
84
84
85
    subtest "auth_by_bind = 1 tests" => sub {
85
    subtest "auth_by_bind = 1 tests" => sub {
86
86
87
        plan tests => 5;
87
        plan tests => 7;
88
88
89
        $auth_by_bind          = 1;
89
        $auth_by_bind          = 1;
90
90
Lines 119-124 subtest "checkpw_ldap tests" => sub { Link Here
119
                    qr/LDAP bind failed as kohauser hola: LDAP error #1: error_name/,
119
                    qr/LDAP bind failed as kohauser hola: LDAP error #1: error_name/,
120
                    "checkpw_ldap prints correct warning if LDAP bind fails";
120
                    "checkpw_ldap prints correct warning if LDAP bind fails";
121
        is ( $ret, -1, "checkpw_ldap returns -1 LDAP bind fails for user (Bug 8148)");
121
        is ( $ret, -1, "checkpw_ldap returns -1 LDAP bind fails for user (Bug 8148)");
122
123
        # regression tests for bug 12831
124
        $desired_authentication_result = 'error';
125
        $anonymous_bind        = 0;
126
        $desired_bind_result   = 'error';
127
        $desired_search_result = 'success';
128
        $desired_count_result  = 0; # user auth problem
129
        $non_anonymous_bind_result = 'error';
130
        reload_ldap_module();
131
132
        warning_like { $ret = C4::Auth_with_ldap::checkpw_ldap(
133
                               $dbh, 'hola', password => 'hey' ) }
134
                    qr/LDAP bind failed as kohauser hola: LDAP error #1: error_name/,
135
                    "checkpw_ldap prints correct warning if LDAP bind fails";
136
        is ( $ret, 0, "checkpw_ldap returns 0 LDAP bind fails for user (Bug 12831)");
137
122
    };
138
    };
123
139
124
    subtest "auth_by_bind = 0 tests" => sub {
140
    subtest "auth_by_bind = 0 tests" => sub {
125
- 

Return to bug 12831