Only load DBICTest::Schema when needed in tests
[dbsrgits/DBIx-Class-Historic.git] / t / sqlmaker / limit_dialects / custom.t
index 1bf3e07..15064c2 100644 (file)
@@ -5,9 +5,7 @@ use Test::More;
 use Test::Warn;
 
 use lib qw(t/lib);
-use DBICTest;
-use DBICTest::Schema;
-use DBIC::SqlMakerTest;
+use DBICTest ':DiffSQL';
 
 # This is legacy stuff from SQL::Absract::Limit
 # Keep it around just in case someone is using it
@@ -24,7 +22,7 @@ use DBIC::SqlMakerTest;
     );
   }
 }
-my $s = DBICTest::Schema->connect (DBICTest->_database);
+my $s = DBICTest->connect_schema (DBICTest->_database);
 $s->storage->sql_maker_class ('DBICTest::SQLMaker::CustomDialect');
 
 my $rs = $s->resultset ('CD');
@@ -32,7 +30,7 @@ my $rs = $s->resultset ('CD');
 warnings_exist { is_same_sql_bind (
   $rs->search ({}, { rows => 1, offset => 3,columns => [
       { id => 'foo.id' },
-      { 'bar.id' => 'bar.id' },
+      { 'artist.id' => 'bar.id' },
       { bleh => \ 'TO_CHAR (foo.womble, "blah")' },
     ]})->as_query,
   '(