From: Peter Rabbitson Date: Fri, 22 Jan 2010 10:35:15 +0000 (+0000) Subject: Moev failing regression test away from trunk X-Git-Tag: v0.08119~20^2~19 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5a38c501e0cb0308cf0f3b60660ed27f3cf39dc0;p=dbsrgits%2FDBIx-Class.git Moev failing regression test away from trunk --- diff --git a/t/88result_set_column.t b/t/88result_set_column.t index f3d31d4..0506ff3 100644 --- a/t/88result_set_column.t +++ b/t/88result_set_column.t @@ -75,7 +75,7 @@ is($psrs->get_column('title')->next, 'The Final Countdown', '+select/+as overrid # test +select/+as for multiple columns $psrs = $schema->resultset('CD')->search({}, { - '+select' => [ \'COUNT(*)', 'title' ], + '+select' => [ \'COUNT(*) AS cnt', 'title' ], '+as' => [ 'count', 'addedtitle' ] } ); @@ -104,7 +104,16 @@ is_same_sql_bind ( 'Correct SQL for get_column/+as func' ); +# test correct subquery with +select when necessary +lives_ok ( sub { + is ( + scalar $psrs->search ({}, { order_by => 'cnt' })->get_column ('year')->all, + $psrs->count, + 'Subquery count induced by aliased function', + ); +}); +# test for prefetch not leaking { my $rs = $schema->resultset("CD")->search({}, { prefetch => 'artist' }); my $rsc = $rs->get_column('year');