Refactor tests a little bit.
[dbsrgits/DBIx-Class-ResultSource-MultipleTableInheritance.git] / t / 03insert.t
index b82ecbc..add074e 100644 (file)
@@ -3,12 +3,12 @@ use warnings;
 use lib 't/lib';
 use Test::More qw(no_plan);
 use Test::Exception;
-use Devel::Dwarn;
+use CafeInsertion;
 
 BEGIN {
-    use_ok 'Cafe';
     $ENV{DBIC_TRACE} = 0;
 }
+
 my ( $dsn, $user, $pass )
     = @ENV{ map {"DBICTEST_PG_${_}"} qw/DSN USER PASS/ };
 plan skip_all => <<'EOM' unless $dsn && $user;
@@ -16,8 +16,7 @@ Set $ENV{DBICTEST_PG_DSN}, _USER and _PASS to run this test
 ( NOTE: This test drops and creates some tables.')
 EOM
 
-my $schema = Cafe->connect( $dsn, $user, $pass );
-$schema->storage->dbh->{Warn} = 0;
+my $schema = CafeInsertion->connect( $dsn, $user, $pass );
 $schema->storage->ensure_connected;
 $schema->storage->_use_insert_returning(0);