Add unit test for LDAP configuration backend
This commit is contained in:
parent
b32ff75a4f
commit
f8fb163523
|
@ -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
|
||||
|
|
30
modules/lemonldap-ng-common/t/05-Common-Conf-LDAP.t
Normal file
30
modules/lemonldap-ng-common/t/05-Common-Conf-LDAP.t
Normal 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') );
|
||||
|
Loading…
Reference in New Issue
Block a user