/[Frey]/trunk/t/50-strix-anekta.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

Contents of /trunk/t/50-strix-anekta.t

Parent Directory Parent Directory | Revision Log Revision Log


Revision 167 - (show annotations)
Tue Aug 12 22:00:05 2008 UTC (15 years, 8 months ago) by dpavlin
File MIME type: application/x-troff
File size: 799 byte(s)
model quick poll with options
1 #!/usr/bin/perl
2 use strict;
3 use warnings;
4
5 my $debug = @ARGV ? 1 : 0;
6
7 use Test::More tests => 10;
8 use lib 'lib';
9
10 use Data::Dump qw/dump/;
11
12 BEGIN {
13 use_ok('Strix::Anketa');
14 use_ok('Frey::Pager');
15 }
16
17 ok( my $o = Strix::Anketa->new( id => 8 ), 'new' ); # XXX magic: we know 8 exists
18 isa_ok( $o, 'Strix::Anketa' );
19 diag dump( $o ) if $debug;
20
21 ok( my $i = $o->collection(), 'collection without pager' );
22 isa_ok( $i, 'Fey::Object::Iterator' );
23 diag dump( $i ) if $debug;
24
25 ok( my $r = $o->total_entries, 'total_entries' );
26 diag "total_entries: $r"; # if $debug;
27
28 my $max = 3;
29
30 while ( my $row = $i->next ) {
31 isa_ok( $row, 'Strix::Anketa' );
32 diag dump( $row ) if $debug;
33 ok( my $pitanja = $row->pitanja, 'pitanja' );
34 while ( my $p = $pitanja->next ) {
35 diag dump( $p );
36 }
37 last if --$max == 0;
38 }
39

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26