Merge branch 'persist_in_session'
[catagits/Catalyst-Authentication-Store-LDAP.git] / t / 50.auth.case.sensitivity.t
CommitLineData
31c69ff5 1#!/usr/bin/env perl
2# vim: ts=8 sts=4 et sw=4 sr sta
3use strict;
4use warnings;
31c69ff5 5
e385da71 6use Test::More;
31c69ff5 7
8use lib 't/lib';
9use LDAPTest;
10
11my $server = LDAPTest::spawn_server();
12
13use_ok("Catalyst::Authentication::Store::LDAP::Backend");
14
15my $back = Catalyst::Authentication::Store::LDAP::Backend->new(
16 { 'ldap_server' => LDAPTest::server_host(),
17
18 # can test the timeout SKIP with this
19 'ldap_server_options' =>
20 { timeout => -1, debug => $ENV{PERL_DEBUG} || 0 },
21
22 'binddn' => 'anonymous',
23 'bindpw' => 'dontcarehow',
24 'start_tls' => 0,
25 'user_basedn' => 'ou=foobar',
26 'user_filter' => '(&(objectClass=person)(uid=%s))',
27 'user_scope' => 'one',
28 'user_field' => 'uid',
29 'use_roles' => 0,
30 }
31);
32isa_ok( $back, "Catalyst::Authentication::Store::LDAP::Backend" );
33
34ok( my $user_mixed = $back->find_user( { username => 'SOmeBOdy' } ), "find_user (mixed case)" );
35isa_ok( $user_mixed, "Catalyst::Authentication::Store::LDAP::User" );
36
e385da71 37done_testing;