/[Grep]/t/00-model-Feed.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-Feed.t

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

revision 2 by dpavlin, Sat Feb 17 16:17:18 2007 UTC revision 4 by dpavlin, Sat Feb 17 17:25:34 2007 UTC
# Line 10  A basic test harness for the Feed model. Line 10  A basic test harness for the Feed model.
10    
11  use Jifty::Test tests => 11;  use Jifty::Test tests => 11;
12    
13    use blib;
14    
15  # Make sure we can load the model  # Make sure we can load the model
16  use_ok('Grep::Model::Feed');  use_ok('Grep::Model::Feed');
17    
# Line 19  ok($system_user, "Found a system user"); Line 21  ok($system_user, "Found a system user");
21    
22  # Try testing a create  # Try testing a create
23  my $o = Grep::Model::Feed->new(current_user => $system_user);  my $o = Grep::Model::Feed->new(current_user => $system_user);
24  my ($id) = $o->create();  my ($id) = $o->create(
25            uri => 'http://saturn.ffzg.hr/noauth/feed/workspace/rot13?search_term=%s',
26            title => 'rot13.org wiki',
27    
28    );
29  ok($id, "Feed create returned success");  ok($id, "Feed create returned success");
30  ok($o->id, "New Feed has valid id set");  ok($o->id, "New Feed has valid id set");
31  is($o->id, $id, "Create returned the right id");  is($o->id, $id, "Create returned the right id");
32    
33  # And another  # And another
34  $o->create();  $o->create(
35            uri => 'http://blog.rot13.org/',
36            title => 'my blog',
37    );
38  ok($o->id, "Feed create returned another value");  ok($o->id, "Feed create returned another value");
39  isnt($o->id, $id, "And it is different from the previous one");  isnt($o->id, $id, "And it is different from the previous one");
40    

Legend:
Removed from v.2  
changed lines
  Added in v.4

  ViewVC Help
Powered by ViewVC 1.1.26