/[A3C]/t/00-model-User.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/00-model-User.t

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

revision 5 by dpavlin, Sun Mar 9 22:39:58 2008 UTC revision 6 by dpavlin, Thu Mar 13 12:09:06 2008 UTC
# Line 19  ok($system_user, "Found a system user"); Line 19  ok($system_user, "Found a system user");
19    
20  # Try testing a create  # Try testing a create
21  my $o = CAdmin::Model::User->new(current_user => $system_user);  my $o = CAdmin::Model::User->new(current_user => $system_user);
22  my ($id) = $o->create();  my ($id) = $o->create(
23            sn => 'Foo',
24            givenName => 'Bar',
25            hrEduPersonUniqueNumber => 42,
26            hrEduPersonAffiliation => 'suradnik',
27            o => 'CARNet',
28            hrEduPersonHomeOrg => 'skole.hr',
29            postalAddress => 'Pere Perica b.b.',
30            l => 'Zagreb',
31    );
32  ok($id, "User create returned success");  ok($id, "User create returned success");
33  ok($o->id, "New User has valid id set");  ok($o->id, "New User has valid id set");
34  is($o->id, $id, "Create returned the right id");  is($o->id, $id, "Create returned the right id");
35    
36  # And another  # And another
37  $o->create();  $o->create(
38            sn => 'Fooby',
39            givenName => 'Bary',
40            hrEduPersonUniqueNumber => 1001,
41            hrEduPersonAffiliation => 'gost',
42            o => 'CARNet',
43            hrEduPersonHomeOrg => 'skole.hr',
44            postalAddress => 'Pere Perica b.b.',
45            l => 'Zagreb',
46    );
47  ok($o->id, "User create returned another value");  ok($o->id, "User create returned another value");
48  isnt($o->id, $id, "And it is different from the previous one");  isnt($o->id, $id, "And it is different from the previous one");
49    

Legend:
Removed from v.5  
changed lines
  Added in v.6

  ViewVC Help
Powered by ViewVC 1.1.26