Commit | Line | Data |
c0329273 |
1 | BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) } |
2 | |
ff1393c7 |
3 | use strict; |
4 | use warnings; |
5 | |
ff1393c7 |
6 | use Test::More; |
7 | |
c0329273 |
8 | |
ff1393c7 |
9 | use DBICTest; |
ff1393c7 |
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 | } |
f54428ab |
22 | |
23 | done_testing; |