/[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 962 by dpavlin, Thu Nov 1 00:17:53 2007 UTC revision 963 by dpavlin, Fri Nov 2 12:59:39 2007 UTC
# Line 10  A (very) basic test harness for the Sear Line 10  A (very) basic test harness for the Sear
10    
11  use Jifty::Test tests => 17;  use Jifty::Test tests => 17;
12    
13    my $debug = 1;
14    
15  use Data::Dump qw/dump/;  use Data::Dump qw/dump/;
16    
17  # Make sure we can load the action  # Make sure we can load the action
# Line 47  cmp_ok($results->count, '>=', 1, 'count' Line 49  cmp_ok($results->count, '>=', 1, 'count'
49    
50  diag "found ", $results->count, " results";  diag "found ", $results->count, " results";
51    
52  ok( my $result = $results->next, 'next' );  ok( my $ds = $results->next, 'next' );
53  isa_ok($result, 'CODE' );  isa_ok($ds, 'Webpacus::Action::DS' );
54    
55  foreach my $f ( qw/database input id TitleProper/ ) {  foreach my $f ( qw/database input id TitleProper/ ) {
56    
57          my $s = $result->( $f );          ok( my $d = $ds->display( $f ), 'display' );
58          ok( ! ref($s), 'SCALAR' );          diag "display: ",dump($d) if $debug;
   
         my @a = $result->( $f );  
         isa_ok( \@a, 'ARRAY' );  
59    
         diag "$f = '$s' ",dump(@a);  
60  }  }
61    

Legend:
Removed from v.962  
changed lines
  Added in v.963

  ViewVC Help
Powered by ViewVC 1.1.26