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

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

revision 6 by dpavlin, Thu Mar 13 12:09:06 2008 UTC revision 11 by dpavlin, Thu Mar 13 14:22:53 2008 UTC
# Line 11  A basic test harness for the User model. Line 11  A basic test harness for the User model.
11  use Jifty::Test tests => 11;  use Jifty::Test tests => 11;
12    
13  # Make sure we can load the model  # Make sure we can load the model
14  use_ok('CAdmin::Model::User');  use_ok('A3C::Model::User');
15    
16  # Grab a system user  # Grab a system user
17  my $system_user = CAdmin::CurrentUser->superuser;  my $system_user = A3C::CurrentUser->superuser;
18  ok($system_user, "Found a system user");  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 = A3C::Model::User->new(current_user => $system_user);
22  my ($id) = $o->create(  my ($id) = $o->create(
23          sn => 'Foo',          sn => 'Foo',
24          givenName => 'Bar',          givenName => 'Bar',
# Line 48  ok($o->id, "User create returned another Line 48  ok($o->id, "User create returned another
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    
50  # Searches in general  # Searches in general
51  my $collection =  CAdmin::Model::UserCollection->new(current_user => $system_user);  my $collection =  A3C::Model::UserCollection->new(current_user => $system_user);
52  $collection->unlimit;  $collection->unlimit;
53  is($collection->count, 2, "Finds two records");  is($collection->count, 2, "Finds two records");
54    

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

  ViewVC Help
Powered by ViewVC 1.1.26