/[A3C]/t/10-ldap.t
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /t/10-ldap.t

Parent Directory Parent Directory | Revision Log Revision Log


Revision 42 - (show annotations)
Sun Mar 30 16:58:21 2008 UTC (14 years, 6 months ago) by dpavlin
File MIME type: application/x-troff
File size: 691 byte(s)
- move all LDAP-related logic in A3C::LDAP
- remove logic to link User and Organization
- ldap search base is now configurable in config.yml
1 #!/usr/bin/env perl
2 use warnings;
3 use strict;
4
5 =head1 DESCRIPTION
6
7 test LDAP module
8
9 =cut
10
11 use Jifty::Test tests => 19;
12
13 use_ok('A3C::LDAP');
14
15 ok( my $ldap = A3C::LDAP->new, 'new' );
16
17 isa_ok( $ldap, 'A3C::LDAP' );
18
19 ok(
20 $ldap->search(
21 base => 'dc=skole,dc=hr',
22 filter => '(objectClass=hrEduOrg)',
23 sizelimit => 10,
24 )
25 ), 'search';
26
27 isa_ok( $ldap, 'A3C::LDAP' );
28
29 cmp_ok( $ldap->count, '==', 10, 'count' );
30
31 foreach my $i ( 1 .. 10 ) {
32 ok( my $entry = $ldap->next, "next $i" );
33 # $entry->dump;
34 }
35
36 ok( my $collection = $ldap->collection('Organization', 3), 'collection Organization' );
37
38 isa_ok( $collection, 'A3C::Model::OrganizationCollection' );
39
40 is( $collection->count, 3, 'count' );

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26