X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F90join_torture.t;h=27111e4479331b02b01dc63a7ff20a1b5c9cf30b;hb=2131aa2eac548e0b10325b97c10d22a61fffd9c9;hp=ef5dec5be296ed0e0efb3e09b1902999de7bddcf;hpb=4e9fc3f33df616fb7340d05e304ff985b9cce9cb;p=dbsrgits%2FDBIx-Class.git diff --git a/t/90join_torture.t b/t/90join_torture.t index ef5dec5..27111e4 100644 --- a/t/90join_torture.t +++ b/t/90join_torture.t @@ -5,8 +5,7 @@ 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 { @@ -50,7 +49,6 @@ lives_ok (sub { ON producer_2.producerid = cd_to_producer_2.producer JOIN artist artist ON artist.artistid = me.artist WHERE ( ( producer.name = ? AND producer_2.name = ? ) ) - ORDER BY me.cdid )', [ [ { sqlt_datatype => 'varchar', dbic_colname => 'producer.name', sqlt_size => 100 } @@ -79,7 +77,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");