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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 106 - (show annotations)
Thu May 1 17:06:02 2008 UTC (15 years, 11 months ago) by dpavlin
File MIME type: application/x-troff
File size: 902 byte(s)
massive re-structuring to enable models specified in configuration file

- version bump [0.04]
- SyncOrganization now accept org_uid as argument
- objectClass(es) for person and organization are now in config.yml
  as well as link between them (filter on person)
- config.yml is now checked for validity in A3C::LDAP
1 #!/usr/bin/env perl
2 use warnings;
3 use strict;
4
5 =head1 DESCRIPTION
6
7 A (very) basic test harness for the SyncOrganization action.
8
9 =cut
10
11 use Jifty::Test tests => 9;
12
13 # Make sure we can load the action
14 use_ok('A3C::Action::SyncOrganization');
15 use_ok('A3C::LDAP');
16
17 ok(my $person_oc = A3C::LDAP->new->objectClass->{person}, 'LDAP.objectClass.person exist');
18
19 my $sync = Jifty::Test->web->new_action(
20 class => 'SyncOrganization',
21 # current_user => $system_user,
22 arguments => {}
23 );
24
25 isa_ok( $sync, 'A3C::Action::SyncOrganization' );
26
27 ok( $sync->arguments->{org_uid}, 'org_uid' );
28
29 $sync->argument_values({ org_uid => 'os-test0604-zg' });
30 $sync->run;
31
32 ok( $sync->result->success, 'result is success' );
33
34 ok( my $coll = $sync->result->content( 'synced-users' ), 'result content have synced-users' );
35
36 isa_ok( $coll, "A3C::Model::${person_oc}Collection" );
37
38 cmp_ok( $coll->count, '>', 0, 'count' );

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26