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

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

revision 30 by dpavlin, Fri May 26 22:28:07 2006 UTC revision 31 by dpavlin, Fri May 26 23:25:35 2006 UTC
# Line 10  A basic test harness for the UserOnSourc Line 10  A basic test harness for the UserOnSourc
10    
11  use Jifty::Test tests => 11;  use Jifty::Test tests => 11;
12    
13    my $nr = 9;
14    
15  # Make sure we can load the model  # Make sure we can load the model
16  use_ok('Transports::Model::UserOnSource');  use_ok('Transports::Model::UserOnSource');
17    
# Line 39  isnt($o->id, $id, "And it is different f Line 41  isnt($o->id, $id, "And it is different f
41  # Searches in general  # Searches in general
42  my $collection =  Transports::Model::UserOnSourceCollection->new(current_user => $system_user);  my $collection =  Transports::Model::UserOnSourceCollection->new(current_user => $system_user);
43  $collection->unlimit;  $collection->unlimit;
44  is($collection->count, 2, "Finds two records");  is($collection->count, $nr + 2, "Finds two records");
45    
46  # Searches in specific  # Searches in specific
47  $collection->limit(column => 'id', value => $o->id);  $collection->limit(column => 'id', value => $o->id);
# Line 52  is($collection->count, 0, "Deleted row i Line 54  is($collection->count, 0, "Deleted row i
54    
55  # And the other one is still there  # And the other one is still there
56  $collection->unlimit;  $collection->unlimit;
57  is($collection->count, 1, "Still one left");  is($collection->count, $nr + 1, "Still one left");
58    

Legend:
Removed from v.30  
changed lines
  Added in v.31

  ViewVC Help
Powered by ViewVC 1.1.26