X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fsearch%2Fsubquery.t;h=49efcb2629c235a3ab2a96c4f01d9c5feed2b3e8;hb=d9672fb94b70dac86a6d4fed7ad46a48c5ee4527;hp=15ac08ed05cb0fd3425f08300186205a2cd389a6;hpb=0491b597f9bf7f3731f5a2799041f2596b0f46be;p=dbsrgits%2FDBIx-Class.git diff --git a/t/search/subquery.t b/t/search/subquery.t index 15ac08e..49efcb2 100644 --- a/t/search/subquery.t +++ b/t/search/subquery.t @@ -1,5 +1,3 @@ -#!/usr/bin/perl - use strict; use warnings; @@ -16,12 +14,12 @@ my $cdrs = $schema->resultset('CD'); my @tests = ( { rs => $cdrs, - search => \[ "title = ? AND year LIKE ?", 'buahaha', '20%' ], + search => \[ "title = ? AND year LIKE ?", [ title => 'buahaha' ], [ year => '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%', + [ title => 'buahaha' ], + [ year => '20%' ], ], }, @@ -157,8 +155,6 @@ my @tests = ( ); -plan tests => @tests * 2; - for my $i (0 .. $#tests) { my $t = $tests[$i]; for my $p (1, 2) { # repeat everything twice, make sure we do not clobber search arguments @@ -169,3 +165,5 @@ for my $i (0 .. $#tests) { ); } } + +done_testing;