X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F76select.t;h=164f58e322bb536da3043b0cb5dc98b2062ca1fe;hb=27ffa6c0c4e12265ea84d2b0b954a3b8954e4d69;hp=bee69e6b12864f0a63b21f0fb7ecc12247c2d7d6;hpb=af6aac2d51a435fa60151ac047e1559257fd4eba;p=dbsrgits%2FDBIx-Class.git diff --git a/t/76select.t b/t/76select.t index bee69e6..164f58e 100644 --- a/t/76select.t +++ b/t/76select.t @@ -9,7 +9,7 @@ use DBIC::SqlMakerTest; my $schema = DBICTest->init_schema(); -plan tests => 24; +plan tests => 23; my $rs = $schema->resultset('CD')->search({}, { @@ -64,6 +64,7 @@ my $cds = $schema->resultset ('CD')->search ({}, { order_by => 'me.cdid'}); # ma cmp_ok ($cds->count, '>', 2, 'Initially populated with more than 2 CDs'); my $table = $cds->result_source->name; +$table = $$table if ref $table eq 'SCALAR'; my $subsel = $cds->search ({}, { columns => [qw/cdid title/], from => \ "(SELECT cdid, title FROM $table LIMIT 2) me", @@ -164,34 +165,19 @@ my $sub_rs = $rs->search ({}, } ); -is_deeply ( - $sub_rs->single, - { - artist => 1, - track_position => 2, - tracks => - { - trackid => 17, - title => 'Apiary', - }, - }, - '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 ( +is_deeply( $sub_rs->single, { - artist => 1, - track_position => 2, - tracks => [ - { - trackid => 17, - title => 'Apiary', - }, - ], + artist => 1, + track_position => 2, + tracks => [ + { + trackid => 17, + title => 'Apiary', + }, + ], }, 'columns/select/as fold properly on sub-searches', - ); -} +); + +