X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F67pager.t;h=b017afbddb2a321fcda9a245efec84d358ef0099;hb=97c96475ed1bdd955ba0e6c4f22087ca05c64162;hp=17b05c325a778741a6cd6d964dd0aff9c0b35625;hpb=d759a1ee6f8a74f6439ad1f4fb52c2fe571c48b1;p=dbsrgits%2FDBIx-Class.git diff --git a/t/67pager.t b/t/67pager.t index 17b05c3..b017afb 100644 --- a/t/67pager.t +++ b/t/67pager.t @@ -1,7 +1,7 @@ use strict; -use warnings; +use warnings; -use Test::More qw(no_plan); +use Test::More; use lib qw(t/lib); use DBICTest; @@ -84,3 +84,21 @@ is($p->(), 10, 'default rows is 10'); $schema->default_resultset_attributes({ rows => 5 }); is($p->(), 5, 'default rows is 5'); + +# test page with offset +$it = $schema->resultset('CD')->search({}, { + rows => 2, + page => 2, + offset => 1, + order_by => 'cdid' +}); + +my $row = $schema->resultset('CD')->search({}, { + order_by => 'cdid', + offset => 3, + rows => 1 +})->single; + +is($row->cdid, $it->first->cdid, 'page with offset'); + +done_testing;