X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F75limit.t;h=61f552068811d37f326050fb687f81f4293b6ed5;hb=d4a39575216302461a304c8c5211109ffb9d39f0;hp=0fc7e3a519e7a9f67dccc8fd782c559106cc2422;hpb=a47e123334d8bcea0d34dc9ea09738d6f3b1fd49;p=dbsrgits%2FDBIx-Class.git diff --git a/t/75limit.t b/t/75limit.t index 0fc7e3a..61f5520 100644 --- a/t/75limit.t +++ b/t/75limit.t @@ -1,5 +1,5 @@ use strict; -use warnings; +use warnings; use Test::More; use lib qw(t/lib); @@ -7,11 +7,6 @@ use DBICTest; my $schema = DBICTest->init_schema(); -BEGIN { - eval "use DBD::SQLite"; - plan $@ ? (skip_all => 'needs DBD::SQLite for testing') : (tests => 9); -} - # test LIMIT my $it = $schema->resultset("CD")->search( {}, { rows => 3, @@ -51,11 +46,20 @@ 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( { title => [ - -and => + -and => { -like => '%bees' }, @@ -68,3 +72,4 @@ $it = $schema->resultset("CD")->search( ); is( $it->count, 1, "complex abstract count ok" ); +done_testing;