Add unit test for LDAP configuration backend

This commit is contained in:
Clément Oudot 2009-12-03 11:27:48 +00:00
parent b32ff75a4f
commit f8fb163523
2 changed files with 31 additions and 0 deletions

View File

@ -27,6 +27,7 @@ t/01-Common-Conf.t
t/02-Common-Conf-File.t
t/03-Common-Conf-DBI.t
t/04-Common-Conf-SOAP.t
t/05-Common-Conf-LDAP.t
t/20-Common-CGI.t
t/30-Common-Safelib.t
t/99-pod.t

View File

@ -0,0 +1,30 @@
# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl Lemonldap-NG-Manager.t'
#########################
# change 'tests => 1' to 'tests => last_test_to_print';
use Test::More tests => 3;
BEGIN { use_ok('Lemonldap::NG::Common::Conf') }
#########################
# Insert your test code below, the Test::More module is use()ed here so read
# its man page ( perldoc Test::More ) for help writing this test script.
my $h;
ok(
$h = new Lemonldap::NG::Common::Conf(
{
type => 'LDAP',
ldapServer => 'ldap://localhost',
ldapConfBase => 'ou=conf,ou=websso,dc=example,dc=com',
ldapBindDN => 'cn=admin,dc=example,dc=com',
ldapBindPassword => 'secret',
}
)
);
ok( $h->can('ldap') );