Standardize hobbs' email address
[dbsrgits/DBIx-Class.git] / t / count / in_subquery.t
CommitLineData
ff1393c7 1use strict;
2use warnings;
3
ff1393c7 4use Test::More;
5
ff1393c7 6use lib qw(t/lib);
7use DBICTest;
8use DBIC::SqlMakerTest;
9
10my $schema = DBICTest->init_schema();
11
12{
13 my $rs = $schema->resultset("CD")->search(
14 { 'artist.name' => 'Caterwauler McCrae' },
15 { join => [qw/artist/]}
16 );
17 my $squery = $rs->get_column('cdid')->as_query;
18 my $subsel_rs = $schema->resultset("CD")->search( { cdid => { IN => $squery } } );
19 is($subsel_rs->count, $rs->count, 'Subselect on PK got the same row count');
20}
f54428ab 21
22done_testing;