/[virtual-ldap]/t/ldap-rewrite.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

Diff of /t/ldap-rewrite.t

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

t/ldap-rewrite.pl revision 71 by dpavlin, Mon Feb 22 22:44:56 2010 UTC t/ldap-rewrite.t revision 76 by dpavlin, Tue Feb 23 01:05:04 2010 UTC
# Line 3  Line 3 
3  use warnings;  use warnings;
4  use strict;  use strict;
5    
6  use Test::More tests => 8;  use Test::More tests => 9;
7  use Data::Dump qw(dump);  use Data::Dump qw(dump);
8    
9  BEGIN {  BEGIN {
# Line 11  BEGIN { Line 11  BEGIN {
11  }  }
12    
13  our $config;  our $config;
14  ok( require "t/config.pl", 'config.pl' );  ok( require( ( shift @ARGV || 't/config.pl' ) ), 'config.pl' );
15    
16  sub ldap_check_error {  sub ldap_check_error {
17          my $o = shift;          my $o = shift;
# Line 28  ok( my $search = $ldap->search( %{ $conf Line 28  ok( my $search = $ldap->search( %{ $conf
28  ldap_check_error $search;  ldap_check_error $search;
29    
30  foreach my $entry ( $search->entries ) {  foreach my $entry ( $search->entries ) {
31    
32          diag dump $entry;          diag dump $entry;
33    
34            my $missing = 0;
35            my @required = @{ $config->{attributes_required} };
36            foreach my $attr ( @required ) {
37                    next if grep { /^\Q$attr\E$/i } $entry->attributes;
38                    $missing++;
39                    diag "$missing missing $attr\n";
40            }
41    
42            ok( ! $missing, "attributes " . dump( @required ) );
43  }  }
44    
45  ok( $ldap->unbind, 'unbind' );  ok( $ldap->unbind, 'unbind' );

Legend:
Removed from v.71  
changed lines
  Added in v.76

  ViewVC Help
Powered by ViewVC 1.1.26