X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fresultset%2Fbind_attr.t;h=71d1b97720daffb60b783fa81fdacb9ba7994480;hb=56270bba4fb06051ea5262d99f858920c796562e;hp=af970204d8d127772b74c6c643bce9aeaa8b5df3;hpb=ea20ead00a56006b5dd6353bdd22c1eed775f864;p=dbsrgits%2FDBIx-Class.git diff --git a/t/resultset/bind_attr.t b/t/resultset/bind_attr.t index af97020..71d1b97 100644 --- a/t/resultset/bind_attr.t +++ b/t/resultset/bind_attr.t @@ -3,10 +3,9 @@ use warnings; use Test::More; use lib qw(t/lib); +use DBICTest; use DBIC::SqlMakerTest; -use_ok('DBICTest'); - my $schema = DBICTest->init_schema; my $where_bind = { @@ -16,9 +15,7 @@ my $where_bind = { my $rs; -TODO: { - local $TODO = 'bind args order needs fixing (semifor)'; - +{ # First, the simple cases... $rs = $schema->resultset('Artist')->search( { artistid => 1 }, @@ -36,6 +33,13 @@ TODO: { ->search({}, $where_bind); is ( $rs->count, 1, 'where/bind last' ); + + # and the complex case + $rs = $schema->resultset('CustomSql')->search({}, { bind => [ 1999 ] }) + ->search({ 'artistid' => 1 }, { + where => \'title like ?', + bind => [ 'Spoon%' ] }); + is ( $rs->count, 1, '...cookbook + chained search with extra bind' ); } { @@ -107,13 +111,4 @@ TODO: { ); } -TODO: { - local $TODO = 'bind args order needs fixing (semifor)'; - $rs = $schema->resultset('Complex')->search({}, { bind => [ 1999 ] }) - ->search({ 'artistid' => 1 }, { - where => \'title like ?', - bind => [ 'Spoon%' ] }); - is ( $rs->count, 1, '...cookbook + chained search with extra bind' ); -} - done_testing;