X-Git-Url: http://git.rot13.org/?p=virtual-ldap;a=blobdiff_plain;f=t%2Fldap-rewrite.pl;h=5e88dbfcdd8e0ea9f638820271e8f4e50f7115da;hp=147a1adc96489ddc97a4fc5c590c87df19bce2c0;hb=540828cf1619eb1da5b9bfd28b51e50201ba41f7;hpb=d76d841dcbea1c0dfa919236720026405d1ddba6 diff --git a/t/ldap-rewrite.pl b/t/ldap-rewrite.pl index 147a1ad..5e88dbf 100755 --- a/t/ldap-rewrite.pl +++ b/t/ldap-rewrite.pl @@ -3,7 +3,7 @@ use warnings; use strict; -use Test::More tests => 8; +use Test::More tests => 9; use Data::Dump qw(dump); BEGIN { @@ -28,7 +28,18 @@ ok( my $search = $ldap->search( %{ $config->{search} } ), 'search ' . dump( $con ldap_check_error $search; foreach my $entry ( $search->entries ) { + diag dump $entry; + + my $missing = 0; + my @required = @{ $config->{attributes_required} }; + foreach my $attr ( @required ) { + next if grep { /^\Q$attr\E$/i } $entry->attributes; + $missing++; + diag "$missing missing $attr\n"; + } + + ok( ! $missing, "attributes " . dump( @required ) ); } ok( $ldap->unbind, 'unbind' );