Retire DBIC/SqlMakerTest.pm now that SQLA::Test provides the same function
[dbsrgits/DBIx-Class.git] / t / search / related_strip_prefetch.t
index 0745baf..5e34fe9 100644 (file)
@@ -2,11 +2,12 @@ use strict;
 use warnings;
 
 use Test::More;
-use Test::Exception;
 
 use lib qw(t/lib);
-use DBIC::SqlMakerTest;
-use DBICTest;
+use DBICTest ':DiffSQL';
+use DBIx::Class::SQLMaker::LimitDialects;
+
+my $ROWS = DBIx::Class::SQLMaker::LimitDialects->__rows_bindtype;
 
 my $schema = DBICTest->init_schema();
 
@@ -25,9 +26,9 @@ is_same_sql_bind (
         SELECT me.cdid, me.artist, me.title, me.year, me.genreid, me.single_track
           FROM cd me
           JOIN artist artist ON artist.artistid = me.artist
-          LEFT JOIN track tracks ON tracks.cd = me.cdid 
+          LEFT JOIN track tracks ON tracks.cd = me.cdid
         WHERE ( tracks.trackid != ? )
-        LIMIT 2
+        LIMIT ?
       ) me
       JOIN artist artist ON artist.artistid = me.artist
       JOIN tags tags ON tags.cd = me.cdid
@@ -35,8 +36,9 @@ is_same_sql_bind (
     GROUP BY tags.tagid, tags.cd, tags.tag
   )',
 
-  [ [ { sqlt_datatype => 'integer', dbic_colname => 'tracks.trackid' }
-      => 666 ]
+  [
+    [ { sqlt_datatype => 'integer', dbic_colname => 'tracks.trackid' } => 666 ],
+    [ $ROWS => 2 ]
   ],
   'Prefetch spec successfully stripped on search_related'
 );