X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F76select.t;h=d2cc72e13888cd3bfa2821ed4f9b5dc5ed053ecf;hb=8f4b5c084378a4c457c8893404aded4398c1d811;hp=01d62f592a7d62fce328b68286ae067e46351854;hpb=bbd828a6a6ae6408fe8cca57d8052447345aa6a9;p=dbsrgits%2FDBIx-Class.git diff --git a/t/76select.t b/t/76select.t index 01d62f5..d2cc72e 100644 --- a/t/76select.t +++ b/t/76select.t @@ -103,7 +103,7 @@ $rs = $schema->resultset('CD')->search({}, is_same_sql_bind ( $rs->as_query, - '(SELECT me.cdid, me.artist, me.title, me.year, me.genreid, me.single_track, me.cdid, me.title, artist.name FROM cd me JOIN artist artist ON artist.artistid = me.artist)', + '(SELECT me.cdid, me.artist, me.title, me.year, me.genreid, me.single_track, artist.name FROM cd me JOIN artist artist ON artist.artistid = me.artist)', [], 'Use of columns attribute results in proper sql' ); @@ -153,35 +153,16 @@ my $sub_rs = $rs->search ({}, } ); -is_deeply ( +is_deeply( $sub_rs->single, { - artist => 1, - track_position => 2, - tracks => - { - title => 'Apiary', - }, + artist => 1, + tracks => { + title => 'Apiary', + trackid => 17, + }, }, 'columns/select/as fold properly on sub-searches', ); -TODO: { - local $TODO = "Multi-collapsing still doesn't work right - HRI should be getting an arrayref, not an individual hash"; - is_deeply ( - $sub_rs->single, - { - artist => 1, - track_position => 2, - tracks => [ - { - trackid => 17, - title => 'Apiary', - }, - ], - }, - 'columns/select/as fold properly on sub-searches', - ); -} - done_testing;