2 # vim: ts=8 sts=4 et sw=4 sr sta
11 my $server = LDAPTest::spawn_server();
13 use_ok("Catalyst::Authentication::Store::LDAP::Backend");
15 my $back = Catalyst::Authentication::Store::LDAP::Backend->new(
16 { 'ldap_server' => LDAPTest::server_host(),
18 # can test the timeout SKIP with this
19 'ldap_server_options' =>
20 { timeout => -1, debug => $ENV{PERL_DEBUG} || 0 },
22 'binddn' => 'anonymous',
23 'bindpw' => 'dontcarehow',
25 'user_basedn' => 'ou=foobar',
26 'user_filter' => '(&(objectClass=person)(uid=%s))',
27 'user_scope' => 'one',
28 'user_field' => 'uid',
32 isa_ok( $back, "Catalyst::Authentication::Store::LDAP::Backend" );
34 ok( my $user_mixed = $back->find_user( { username => 'SOmeBOdy' } ), "find_user (mixed case)" );
35 isa_ok( $user_mixed, "Catalyst::Authentication::Store::LDAP::User" );