X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fprefetch%2Fgrouped.t;h=c0d2224e9d43294fae992a2f41420802cdb14dd0;hb=adcc1df0049e0093cb94c867bd2be8c9fe242a61;hp=0f6f59a293b194fcfb4aa11ff857a127093f0aa3;hpb=1b658919f5ff67e9ac656daf6642a3bae8cec282;p=dbsrgits%2FDBIx-Class.git diff --git a/t/prefetch/grouped.t b/t/prefetch/grouped.t index 0f6f59a..c0d2224 100644 --- a/t/prefetch/grouped.t +++ b/t/prefetch/grouped.t @@ -1,9 +1,10 @@ +BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) } + use strict; use warnings; use Test::More; -use lib qw(t/lib); use DBICTest ':DiffSQL'; use DBIx::Class::SQLMaker::LimitDialects; @@ -100,7 +101,7 @@ my @cdids = sort $cd_rs->get_column ('cdid')->all; # add an extra track to one of the cds, and then make sure we can get it on top # (check if limit works) - my $top_cd = $cd_rs->slice (1,1)->next; + my $top_cd = $cd_rs->search({}, { order_by => 'cdid' })->slice (1,1)->next; $top_cd->create_related ('tracks', { title => 'over the top', });