projects
/
virtual-ldap
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
896e699
)
dump config and don't re-use $search for results of search
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Thu, 6 May 2010 06:22:09 +0000
(06:22 +0000)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Thu, 6 May 2010 06:22:09 +0000
(06:22 +0000)
t/ldap-koha.t
patch
|
blob
|
history
diff --git
a/t/ldap-koha.t
b/t/ldap-koha.t
index
ddd856b
..
cc8191a
100755
(executable)
--- a/
t/ldap-koha.t
+++ b/
t/ldap-koha.t
@@
-3,13
+3,18
@@
use warnings;
use strict;
use warnings;
use strict;
-use Test::More tests => 7
5
;
+use Test::More tests => 7
6
;
use Data::Dump qw(dump);
BEGIN {
use_ok 'Net::LDAP';
}
use Data::Dump qw(dump);
BEGIN {
use_ok 'Net::LDAP';
}
+our $config;
+ok( require( ( shift @ARGV || 't/config.pl' ) ), 'config.pl' );
+
+diag "config ",dump($config);
+
sub ldap_check_error {
my $o = shift;
ok( ! $o->code, 'no errror' );
sub ldap_check_error {
my $o = shift;
ok( ! $o->code, 'no errror' );
@@
-32,10
+37,10
@@
sub check_search_attributes {
sub search {
my ($ldap,$search) = @_;
sub search {
my ($ldap,$search) = @_;
- ok( my $
search
= $ldap->search( filter => $search ), "search $search" );
- ldap_check_error $
search
;
- ok( $
search
->entries, 'have results' );
- return $
search
;
+ ok( my $
result
= $ldap->search( filter => $search ), "search $search" );
+ ldap_check_error $
result
;
+ ok( $
result
->entries, 'have results' );
+ return $
result
;
}
foreach my $search ( qw/
}
foreach my $search ( qw/