X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F75limit.t;h=881668de4da04f2c1e1b47bca47452e7cb45ab6a;hb=bb1329e09c7115768ffe2d52a4d70fff9549cd9d;hp=98d3b64b29eca1219ce778bd9c92701be058acfd;hpb=d6915f449e2d68ac184d6bc616043fd605913757;p=dbsrgits%2FDBIx-Class.git diff --git a/t/75limit.t b/t/75limit.t index 98d3b64..881668d 100644 --- a/t/75limit.t +++ b/t/75limit.t @@ -5,12 +5,12 @@ use Test::More; use lib qw(t/lib); use DBICTest; -my $schema = DBICTest::init_schema(); +my $schema = DBICTest->init_schema(); BEGIN { eval "use DBD::SQLite"; - plan $@ ? (skip_all => 'needs DBD::SQLite for testing') : (tests => 9); -} + plan $@ ? (skip_all => 'needs DBD::SQLite for testing') : (tests => 10); +} # test LIMIT my $it = $schema->resultset("CD")->search( {}, @@ -51,6 +51,15 @@ is( $it->next, undef, "software next past end of resultset ok" ); ); is( $cds[0]->title, "Spoonful of bees", "software offset ok" ); + +@cds = $schema->resultset("CD")->search( {}, + { + offset => 2, + order_by => 'year' } +); +is( $cds[0]->title, "Spoonful of bees", "offset with no limit" ); + + # based on a failing criteria submitted by waswas # requires SQL::Abstract >= 1.20 $it = $schema->resultset("CD")->search(