X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fresultset%2Fas_query.t;fp=t%2Fresultset%2Fas_query.t;h=f849f7a20baaa470f5f5d3e455d215c84c1f4e78;hb=038af71cf6f6c77cb1380378d4887a7da03fe2b2;hp=c49608512335af1f463cdfa0a4a0f27dd02a31b9;hpb=e90b8592bad60e552f3a013254f9a4a68acbe138;p=dbsrgits%2FDBIx-Class.git diff --git a/t/resultset/as_query.t b/t/resultset/as_query.t index c496085..f849f7a 100644 --- a/t/resultset/as_query.t +++ b/t/resultset/as_query.t @@ -7,7 +7,7 @@ use Data::Dumper; use Test::More; -plan ( tests => 4 ); +plan ( tests => 5 ); use lib qw(t/lib); use DBICTest; @@ -65,3 +65,13 @@ my $rscol = $art_rs->get_column( 'charfield' ); [ [ rank => 2 ], [ name => 'Billy Joel' ] ], ); } + +TODO: { + local $TODO = 'Needs -paren fixes in SQLA before it can work'; + my $rs = $schema->resultset("CD")->search( + { 'artist.name' => 'Caterwauler McCrae' }, + { join => [qw/artist/]} + ); + my $subsel_rs = $schema->resultset("CD")->search( { cdid => { IN => $rs->get_column('cdid')->as_query } } ); + cmp_ok($subsel_rs->count, '==', $rs->count, 'Subselect on PK got the same row count'); +}