Trap expected t/746sybase.t warnings, use LC_ALL instead of LANG
[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;
ff1393c7 8
9my $schema = DBICTest->init_schema();
10
11{
12 my $rs = $schema->resultset("CD")->search(
13 { 'artist.name' => 'Caterwauler McCrae' },
14 { join => [qw/artist/]}
15 );
16 my $squery = $rs->get_column('cdid')->as_query;
17 my $subsel_rs = $schema->resultset("CD")->search( { cdid => { IN => $squery } } );
18 is($subsel_rs->count, $rs->count, 'Subselect on PK got the same row count');
19}
f54428ab 20
21done_testing;