/[webpac2]/Webpacus2/t/00-action-Search.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 /Webpacus2/t/00-action-Search.t

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

revision 953 by dpavlin, Thu Nov 1 00:17:49 2007 UTC revision 954 by dpavlin, Thu Nov 1 00:17:53 2007 UTC
# Line 8  A (very) basic test harness for the Sear Line 8  A (very) basic test harness for the Sear
8    
9  =cut  =cut
10    
11  use Jifty::Test tests => 7;  use Jifty::Test tests => 17;
12    
13    use Data::Dump qw/dump/;
14    
15  # Make sure we can load the action  # Make sure we can load the action
16  use_ok('Webpacus::Action::Search');  use_ok('Webpacus::Action::Search');
# Line 44  isa_ok($results, 'Webpacus::Search::Resu Line 46  isa_ok($results, 'Webpacus::Search::Resu
46  cmp_ok($results->count, '>=', 1, 'count');  cmp_ok($results->count, '>=', 1, 'count');
47    
48  diag "found ", $results->count, " results";  diag "found ", $results->count, " results";
49    
50    ok( my $result = $results->next, 'next' );
51    isa_ok($result, 'CODE' );
52    
53    foreach my $f ( qw/database input id TitleProper/ ) {
54    
55            my $s = $result->( $f );
56            ok( ! ref($s), 'SCALAR' );
57    
58            my @a = $result->( $f );
59            isa_ok( \@a, 'ARRAY' );
60    
61            diag "$f = '$s' ",dump(@a);
62    }
63    

Legend:
Removed from v.953  
changed lines
  Added in v.954

  ViewVC Help
Powered by ViewVC 1.1.26