X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fsearch%2Fsubquery.t;h=5afc9f3d8d13aeb9e2a604623edc8881bc62eec5;hb=8b7789c969e4088e62dfeea2dc87851f74a8c496;hp=72eaeec2a1787ee17f68e2576d4157ca592170ef;hpb=69989ea9caa5b8231451a2d715f2d40f60b338f1;p=dbsrgits%2FDBIx-Class.git diff --git a/t/search/subquery.t b/t/search/subquery.t index 72eaeec..5afc9f3 100644 --- a/t/search/subquery.t +++ b/t/search/subquery.t @@ -3,11 +3,8 @@ use strict; use warnings; -use Data::Dumper; - use Test::More; - use lib qw(t/lib); use DBICTest; use DBIC::SqlMakerTest; @@ -19,6 +16,17 @@ my $cdrs = $schema->resultset('CD'); my @tests = ( { rs => $cdrs, + search => \[ "title = ? AND year LIKE ?", 'buahaha', '20%' ], + attrs => { rows => 5 }, + sqlbind => \[ + "( SELECT me.cdid,me.artist,me.title,me.year,me.genreid,me.single_track FROM cd me WHERE (title = ? AND year LIKE ?) LIMIT 5)", + 'buahaha', + '20%', + ], + }, + + { + rs => $cdrs, search => { artist_id => { 'in' => $art_rs->search({}, { rows => 1 })->get_column( 'id' )->as_query }, },