--- trunk/t/50-strix-user.t 2008/07/13 16:17:34 111 +++ trunk/t/50-strix-user.t 2008/07/16 14:17:46 143 @@ -4,7 +4,7 @@ my $debug = shift @ARGV; -use Test::More tests => 8; +use Test::More tests => 10; use lib 'lib'; #use Devel::LeakTrace::Fast; @@ -12,6 +12,7 @@ BEGIN { use_ok('Strix::User'); + use_ok('Frey::Pager'); } ok( my $u = Strix::User->new( id => 1 ), 'new' ); @@ -19,15 +20,18 @@ diag dump( $u ) if $debug; -ok( my $i = $u->collection( { per_page => 2 } ), 'collection' ); +ok( my $i = $u->collection(), 'collection without pager' ); isa_ok( $i, 'Fey::Object::Iterator' ); diag dump( $i ) if $debug; -ok( my $r = $u->total_rows, 'total_rows' ); -diag "total_rows: $r"; # if $debug; +ok( my $r = $u->total_entries, 'total_entries' ); +diag "total_entries: $r"; # if $debug; + +my $max = 3; while ( my $row = $i->next ) { isa_ok( $row, 'Strix::User' ); + last if --$max == 0; }