Retire DBIC/SqlMakerTest.pm now that SQLA::Test provides the same function
[dbsrgits/DBIx-Class.git] / t / resultset / bind_attr.t
index af97020..7f25d99 100644 (file)
@@ -3,9 +3,7 @@ use warnings;
 
 use Test::More;
 use lib qw(t/lib);
-use DBIC::SqlMakerTest;
-
-use_ok('DBICTest');
+use DBICTest ':DiffSQL';
 
 my $schema = DBICTest->init_schema;
 
@@ -16,9 +14,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 +32,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 +110,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;