[Catalyst-commits] r8380 - Catalyst-Authentication-Store-LDAP/trunk/t

karpet at dev.catalyst.perl.org karpet at dev.catalyst.perl.org
Tue Sep 9 22:10:57 BST 2008


Author: karpet
Date: 2008-09-09 22:10:57 +0100 (Tue, 09 Sep 2008)
New Revision: 8380

Added:
   Catalyst-Authentication-Store-LDAP/trunk/t/50.auth.case.sensitivity.t
Log:
add chisel test for failing case sensitivity

Added: Catalyst-Authentication-Store-LDAP/trunk/t/50.auth.case.sensitivity.t
===================================================================
--- Catalyst-Authentication-Store-LDAP/trunk/t/50.auth.case.sensitivity.t	                        (rev 0)
+++ Catalyst-Authentication-Store-LDAP/trunk/t/50.auth.case.sensitivity.t	2008-09-09 21:10:57 UTC (rev 8380)
@@ -0,0 +1,37 @@
+#!/usr/bin/env perl
+# vim: ts=8 sts=4 et sw=4 sr sta
+use strict;
+use warnings;
+use Catalyst::Exception;
+
+use Test::More tests => 4;
+
+use lib 't/lib';
+use LDAPTest;
+
+my $server = LDAPTest::spawn_server();
+
+use_ok("Catalyst::Authentication::Store::LDAP::Backend");
+
+my $back = Catalyst::Authentication::Store::LDAP::Backend->new(
+    {   'ldap_server' => LDAPTest::server_host(),
+
+        # can test the timeout SKIP with this
+        'ldap_server_options' =>
+            { timeout => -1, debug => $ENV{PERL_DEBUG} || 0 },
+
+        'binddn'      => 'anonymous',
+        'bindpw'      => 'dontcarehow',
+        'start_tls'   => 0,
+        'user_basedn' => 'ou=foobar',
+        'user_filter' => '(&(objectClass=person)(uid=%s))',
+        'user_scope'  => 'one',
+        'user_field'  => 'uid',
+        'use_roles'   => 0,
+    }
+);
+isa_ok( $back, "Catalyst::Authentication::Store::LDAP::Backend" );
+
+ok( my $user_mixed = $back->find_user( { username => 'SOmeBOdy' } ), "find_user (mixed case)" );
+isa_ok( $user_mixed, "Catalyst::Authentication::Store::LDAP::User" );
+




More information about the Catalyst-commits mailing list