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'); |
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 |
|
|