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

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

revision 11 by dpavlin, Fri May 5 21:19:36 2006 UTC revision 23 by dpavlin, Fri May 26 18:40:47 2006 UTC
# Line 10  A basic test harness for the User model. Line 10  A basic test harness for the User model.
10    
11  use Jifty::Test tests => 11;  use Jifty::Test tests => 11;
12    
13    my $bootstrap_users = 2;
14    
15  # Make sure we can load the model  # Make sure we can load the model
16  use_ok('Transports::Model::User');  use_ok('Transports::Model::User');
17    
# Line 40  isnt($o->id, $id, "And it is different f Line 42  isnt($o->id, $id, "And it is different f
42  # Searches in general  # Searches in general
43  my $collection =  Transports::Model::UserCollection->new(current_user => $system_user);  my $collection =  Transports::Model::UserCollection->new(current_user => $system_user);
44  $collection->unlimit;  $collection->unlimit;
45  is($collection->count, 3, "Finds two records");  is($collection->count, $bootstrap_users + 2, "Finds two records");
46    
47  # Searches in specific  # Searches in specific
48  $collection->limit(column => 'id', value => $o->id);  $collection->limit(column => 'id', value => $o->id);
# Line 53  is($collection->count, 0, "Deleted row i Line 55  is($collection->count, 0, "Deleted row i
55    
56  # And the other one is still there  # And the other one is still there
57  $collection->unlimit;  $collection->unlimit;
58  is($collection->count, 2, "Still one left");  is($collection->count, $bootstrap_users + 1, "Still one left");
59    

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

  ViewVC Help
Powered by ViewVC 1.1.26