From: Johannes Plunien Date: Sat, 2 May 2009 19:11:40 +0000 (+0000) Subject: Failing testcase for using subselect (as_query) X-Git-Tag: v0.08103~121 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9010576db00bf03ba50ce5a2a439aeda14d32b92;p=dbsrgits%2FDBIx-Class.git Failing testcase for using subselect (as_query) --- diff --git a/t/resultset/as_query.t b/t/resultset/as_query.t index 7f4c738..6065307 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; @@ -66,4 +66,13 @@ my $rscol = $art_rs->get_column( 'charfield' ); ); } +{ + 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'); +} + __END__