X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F67pager.t;h=6a6aabc60d1c44e7b7414dcb3670be83ecfd0f07;hb=b75235fe460933adf4e637e6ef4c0bea5cb57aae;hp=17b05c325a778741a6cd6d964dd0aff9c0b35625;hpb=d759a1ee6f8a74f6439ad1f4fb52c2fe571c48b1;p=dbsrgits%2FDBIx-Class.git diff --git a/t/67pager.t b/t/67pager.t index 17b05c3..6a6aabc 100644 --- a/t/67pager.t +++ b/t/67pager.t @@ -84,3 +84,19 @@ 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');