App-LDAP
view release on metacpan or search on metacpan
t/ldif/user.t view on Meta::CPAN
telexNumber
teletexTerminalIdentifier
telephoneNumber
internationaliSDNNumber
facsimileTelephoneNumber
street
postOfficeBox
postalCode
postalAddress
physicalDeliveryOfficeName
ou
st
l
seeAlso )],
"ensure the attributes",
);
is_deeply (
[sort map { $_->name } grep { $_->is_required } App::LDAP::LDIF::User->meta->get_all_attributes],
[sort qw( objectClass
sn
cn
uid
uidNumber
gidNumber
homeDirectory
dn
userPassword )],
"make sure required attributes",
);
is (
$user->dn,
"uid=nobody,ou=People,dc=example,dc=com",
"dn is compose of name and its ou",
);
is (
$user->uid,
"nobody",
"uid is name",
);
is_deeply (
$user->cn,
["nobody"],
"cn is name",
);
is_deeply (
$user->objectClass,
[qw(inetOrgPerson posixAccount top shadowAccount)],
"objectClass has default",
);
is (
$user->userPassword,
"appldap0000",
"password should be assigned",
);
ok (
$user->shadowLastChange,
"shadowLastChange has default",
);
is (
$user->shadowMin,
0,
"shadowMin has default 0",
);
is (
$user->shadowMax,
"99999",
"shadowMax has default",
);
is (
$user->shadowWarning,
"7",
"shadowWarning has default",
);
is (
$user->loginShell,
"/bin/bash",
"default shell should be bash",
);
is_deeply (
$user->sn,
["nobody"],
"user has sn",
);
is_deeply (
$user->mail,
['nobody@example.com'],
"uesr has mail",
);
is (
$user->title,
"Engineer",
"extra attribute like title can be initialized",
);
like (
$user->entry->ldif,
qr{sn: nobody},
"sn has been exported",
);
like (
$user->entry->ldif,
qr{mail: nobody\@example.com},
"mail has been exported",
);
( run in 1.205 second using v1.01-cache-2.11-cpan-39bf76dae61 )