FetchFirst does not inject an order because me.title is unique
[dbsrgits/DBIx-Class.git] / t / sqlmaker / limit_dialects / custom.t
index 4a78951..8bdee1a 100644 (file)
@@ -4,6 +4,7 @@ use warnings;
 use Test::More;
 
 use lib qw(t/lib);
+use DBICTest;
 use DBICTest::Schema;
 use DBIC::SqlMakerTest;
 
@@ -22,29 +23,11 @@ use DBIC::SqlMakerTest;
     );
   }
 }
-
-my $s = DBICTest::Schema->connect ('dbi:SQLite::memory:');
+my $s = DBICTest::Schema->connect (DBICTest->_database);
 $s->storage->sql_maker_class ('DBICTest::SQLMaker::CustomDialect');
 
 my $rs = $s->resultset ('CD');
-is_same_sql_bind (
-  $rs->search ({}, { rows => 1, offset => 3,columns => [
-      { id => 'foo.id' },
-      { 'bar.id' => 'bar.id' },
-      { bleh => \ 'TO_CHAR (foo.womble, "blah")' },
-    ]})->as_query,
-  '(
-    shiny sproc (
-      (
-        SELECT foo.id, bar.id, TO_CHAR (foo.womble, "blah")
-          FROM cd me
-      ),
-      1,
-      3
-    )
-  )',
-  [],
-  'Rownum subsel aliasing works correctly'
-);
+
+ok(!eval { $rs->all }, 'Legacy emulate_limit method dies');
 
 done_testing;