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

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

revision 26 by dpavlin, Fri May 5 21:19:36 2006 UTC revision 27 by dpavlin, Fri May 26 21:21:25 2006 UTC
# Line 10  A basic test harness for the Source mode Line 10  A basic test harness for the Source mode
10    
11  use Jifty::Test tests => 11;  use Jifty::Test tests => 11;
12    
13    my $nr = 6;
14    
15  # Make sure we can load the model  # Make sure we can load the model
16  use_ok('Transports::Model::Source');  use_ok('Transports::Model::Source');
17    
# Line 32  isnt($o->id, $id, "And it is different f Line 34  isnt($o->id, $id, "And it is different f
34  # Searches in general  # Searches in general
35  my $collection =  Transports::Model::SourceCollection->new(current_user => $system_user);  my $collection =  Transports::Model::SourceCollection->new(current_user => $system_user);
36  $collection->unlimit;  $collection->unlimit;
37  is($collection->count, 4, "Finds two records");  is($collection->count, $nr + 2, "Finds two records");
38    
39  # Searches in specific  # Searches in specific
40  $collection->limit(column => 'id', value => $o->id);  $collection->limit(column => 'id', value => $o->id);
# Line 45  is($collection->count, 0, "Deleted row i Line 47  is($collection->count, 0, "Deleted row i
47    
48  # And the other one is still there  # And the other one is still there
49  $collection->unlimit;  $collection->unlimit;
50  is($collection->count, 3, "Still one left");  is($collection->count, $nr + 1, "Still one left");
51    

Legend:
Removed from v.26  
changed lines
  Added in v.27

  ViewVC Help
Powered by ViewVC 1.1.26