X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F67pager.t;h=b7bb73f480bab1712492f7fe93d12f3f894250f0;hb=9c1d9e6ec933f2161bbcfa760ca8a30580f0d0e3;hp=6abea95a9ca4ae104fdc8fc3150237f81d5de63e;hpb=4d993a620321bb32e79b8e79565c051e97d095c0;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/t/67pager.t b/t/67pager.t index 6abea95..b7bb73f 100644 --- a/t/67pager.t +++ b/t/67pager.t @@ -1,14 +1,12 @@ use strict; use warnings; -use Test::More; +use Test::More qw(no_plan); use lib qw(t/lib); use DBICTest; my $schema = DBICTest->init_schema(); -plan tests => 13; - # first page my $it = $schema->resultset("CD")->search( {}, @@ -76,3 +74,11 @@ $it = $schema->resultset("CD")->search( )->search( undef, { order_by => 'title' } ); is( $it->count, 2, "chained searches paging ok" ); + +my $p = sub { $schema->resultset("CD")->page(1)->pager->entries_per_page; }; + +is($p->(), 10, 'default rows is 10'); + +$schema->default_resultset_attributes({ rows => 5 }); + +is($p->(), 5, 'default rows is 5');