X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F90join_torture.t;h=8ba193e5ef5aa34897a83987c7a2a86faabe954c;hb=8aae794001ecccdb26c2bbd1b92c97bba9e65d79;hp=aa8c3fb8fe5694dfa6aca8654a040e3cc53ce4d0;hpb=65ad59ab00bf973e5fd7a375927fd831e6b6e6dc;p=dbsrgits%2FDBIx-Class.git diff --git a/t/90join_torture.t b/t/90join_torture.t index aa8c3fb..8ba193e 100644 --- a/t/90join_torture.t +++ b/t/90join_torture.t @@ -1,12 +1,13 @@ +BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) } + use strict; use warnings; use Test::More; use Test::Exception; -use lib qw(t/lib); -use DBICTest; -use DBIC::SqlMakerTest; + +use DBICTest ':DiffSQL'; my $schema = DBICTest->init_schema(); lives_ok (sub { @@ -78,7 +79,9 @@ cmp_ok(scalar($rs3->all), '==', 15, "All cds for artist returned"); cmp_ok($rs3->count, '==', 15, "All cds for artist returned via count"); -my $rs4 = $schema->resultset("CD")->search({ 'artist.artistid' => '1' }, { join => ['tracks', 'artist'], prefetch => 'artist' }); +my $rs4 = $schema->resultset("CD")->search({ 'artist.artistid' => '1' }, { + join => ['tracks', 'artist'], prefetch => 'artist', order_by => 'me.cdid' +}); my @rs4_results = $rs4->all; is($rs4_results[0]->cdid, 1, "correct artist returned");