Introduce GOVERNANCE document and empty RESOLUTIONS file.
[dbsrgits/DBIx-Class.git] / t / count / in_subquery.t
1 BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
2
3 use strict;
4 use warnings;
5
6 use Test::More;
7
8
9 use DBICTest;
10
11 my $schema = DBICTest->init_schema();
12
13 {
14     my $rs = $schema->resultset("CD")->search(
15         { 'artist.name' => 'Caterwauler McCrae' },
16         { join => [qw/artist/]}
17     );
18     my $squery = $rs->get_column('cdid')->as_query;
19     my $subsel_rs = $schema->resultset("CD")->search( { cdid => { IN => $squery } } );
20     is($subsel_rs->count, $rs->count, 'Subselect on PK got the same row count');
21 }
22
23 done_testing;