--- t/10-ldap.t 2008/03/30 13:32:29 39 +++ t/10-ldap.t 2008/03/30 15:02:55 40 @@ -8,22 +8,26 @@ =cut -use Jifty::Test tests => 5; +use Jifty::Test tests => 16; use_ok('A3C::LDAP'); +ok( my $ldap = A3C::LDAP->new, 'new' ); + +isa_ok( $ldap, 'A3C::LDAP' ); + ok( - my $msg = A3C::LDAP->search( + $ldap->search( base => 'dc=skole,dc=hr', filter => '(objectClass=hrEduOrg)', ) ), 'search'; -diag 'code: ', $msg->code, ' count: ', $msg->count; - -isa_ok( $msg, 'Net::LDAP::Search' ); - -is( $msg->code, 0, 'code' ); +isa_ok( $ldap, 'A3C::LDAP' ); -cmp_ok( $msg->count, '>', 1000, 'count' ); +cmp_ok( $ldap->count, '>', 1000, 'count' ); +foreach my $i ( 1 .. 10 ) { + ok( my $entry = $ldap->next, "next $i" ); +# $entry->dump; +}