X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Frun%2F07pager.tl;h=d864afa006ce46d3365172c982012c54b8b95089;hb=d52170d466537df84dc1d86c84d9cd5a8e58407a;hp=3132af683d17eaafa60c1c75eadd196f47acbbf3;hpb=3712e4f41b929456d8fad713ca702e4a48e9a940;p=dbsrgits%2FDBIx-Class.git diff --git a/t/run/07pager.tl b/t/run/07pager.tl index 3132af6..d864afa 100644 --- a/t/run/07pager.tl +++ b/t/run/07pager.tl @@ -1,9 +1,10 @@ sub run_tests { +my $schema = shift; plan tests => 12; # first page -my $it = DBICTest->class("CD")->search( +my $it = $schema->resultset("CD")->search( {}, { order_by => 'title', rows => 3, @@ -24,7 +25,7 @@ $it->next; is( $it->next, undef, "next past end of page ok" ); # second page, testing with array -my @page2 = DBICTest->class("CD")->search( +my @page2 = $schema->resultset("CD")->search( {}, { order_by => 'title', rows => 3, @@ -34,7 +35,7 @@ my @page2 = DBICTest->class("CD")->search( is( $page2[0]->title, "Generic Manufactured Singles", "second page first title ok" ); # page a standard resultset -$it = DBICTest->class("CD")->search( +$it = $schema->resultset("CD")->search( {}, { order_by => 'title', rows => 3 } @@ -46,7 +47,7 @@ is( $page->count, 2, "standard resultset paged rs count ok" ); is( $page->next->title, "Generic Manufactured Singles", "second page of standard resultset ok" ); # test software-based limit paging -$it = DBICTest->class("CD")->search( +$it = $schema->resultset("CD")->search( {}, { order_by => 'title', rows => 3,