2 # vim: ts=8 sts=4 et sw=4 sr sta
5 use Catalyst::Exception;
7 use Test::More tests => 4;
12 my $server = LDAPTest::spawn_server();
14 use_ok("Catalyst::Authentication::Store::LDAP::Backend");
16 my $back = Catalyst::Authentication::Store::LDAP::Backend->new(
17 { 'ldap_server' => LDAPTest::server_host(),
19 # can test the timeout SKIP with this
20 'ldap_server_options' =>
21 { timeout => -1, debug => $ENV{PERL_DEBUG} || 0 },
23 'binddn' => 'anonymous',
24 'bindpw' => 'dontcarehow',
26 'user_basedn' => 'ou=foobar',
27 'user_filter' => '(&(objectClass=person)(uid=%s))',
28 'user_scope' => 'one',
29 'user_field' => 'uid',
33 isa_ok( $back, "Catalyst::Authentication::Store::LDAP::Backend" );
35 ok( my $user_mixed = $back->find_user( { username => 'SOmeBOdy' } ), "find_user (mixed case)" );
36 isa_ok( $user_mixed, "Catalyst::Authentication::Store::LDAP::User" );