X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fprefetch%2Fwith_limit.t;h=b8c13a3b8aa6efd16f572d0f68ad53435c7d0920;hb=9f6555d31bc48b6fa3792f74368fc1f17f77ea60;hp=24625ad8b57cabe1d550c6f77f8216c884b23113;hpb=8e84e727440f2d5f9f6fdc5271aa48c094ab0df6;p=dbsrgits%2FDBIx-Class.git diff --git a/t/prefetch/with_limit.t b/t/prefetch/with_limit.t index 24625ad..b8c13a3 100644 --- a/t/prefetch/with_limit.t +++ b/t/prefetch/with_limit.t @@ -8,8 +8,6 @@ use Test::Exception; use lib qw(t/lib); use DBICTest; -plan tests => 9; - my $schema = DBICTest->init_schema(); @@ -25,6 +23,8 @@ my $no_prefetch = $schema->resultset('Artist')->search( my $use_prefetch = $no_prefetch->search( {}, { + select => ['me.artistid', 'me.name'], + as => ['artistid', 'name'], prefetch => 'cds', order_by => { -desc => 'name' }, } @@ -89,3 +89,5 @@ is($artist->cds->count, 1, "count on search limiting prefetched has_many"); # try with double limit my $artist2 = $use_prefetch->search({'cds.title' => { '!=' => $artist_many_cds->cds->first->title } })->slice (0,0)->next; is($artist2->cds->count, 2, "count on search limiting prefetched has_many"); + +done_testing;