/[A3C]/t/00-action-SearchLDAP.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/00-action-SearchLDAP.t

Parent Directory Parent Directory | Revision Log Revision Log


Revision 231 - (show annotations)
Sun Aug 31 11:54:40 2008 UTC (10 years, 10 months ago) by dpavlin
File MIME type: application/x-troff
File size: 810 byte(s)
Added action SearchLDAP which replace old dump and enables us to issue
search requests directly to upstream LDAP to check it's current data
1 #!/usr/bin/env perl
2 use warnings;
3 use strict;
4
5 =head1 DESCRIPTION
6
7 A (very) basic test harness for the SearchLDAP action.
8
9 =cut
10
11 use Jifty::Test tests => 6;
12 use Data::Dump qw/dump/;
13
14 # Make sure we can load the action
15 use_ok('A3C::Action::SearchLDAP');
16
17 my $action = Jifty::Test->web->new_action(
18 class => 'SearchLDAP',
19 # current_user => $system_user,
20 arguments => {
21 base => 'dc=skole,dc=hr',
22 filter => 'objectClass=hrEduOrg',
23 sizelimit => 3,
24 }
25 );
26
27 isa_ok( $action, 'A3C::Action::SearchLDAP' );
28
29 $action->run;
30
31 ok( $action->result->success, 'result is success' );
32
33 ok( my $search = $action->result->content( 'current_search' ), 'result content have current_search' );
34
35 isa_ok( $search, "Net::LDAP::Search" );
36
37 #diag dump( $search->entries );
38
39 cmp_ok( $search->entries, '==', 3, 'entries' );

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26