--- trunk/t/10-strix-user.t 2008/06/28 18:37:13 7 +++ trunk/t/50-strix-user.t 2008/11/26 07:57:12 532 @@ -2,9 +2,9 @@ use strict; use warnings; -my $debug = shift @ARGV; +my $debug = @ARGV ? 1 : 0; -use Test::More tests => 3; +use Test::More tests => 10; use lib 'lib'; #use Devel::LeakTrace::Fast; @@ -12,9 +12,26 @@ BEGIN { use_ok('Strix::User'); + use_ok('Frey::Pager'); } ok( my $u = Strix::User->new( id => 1 ), 'new' ); isa_ok( $u, 'Strix::User' ); -diag dump( $u ); +diag dump( $u ) if $debug; + +ok( my $i = $u->collection(), 'collection without pager' ); +isa_ok( $i, 'Fey::Object::Iterator' ); + +diag dump( $i ) 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; +} +