Bring out the big-paranoia-harness - make describe_env infallible
[dbsrgits/DBIx-Class.git] / t / 64db.t
index b207a29..9f293e2 100644 (file)
--- a/t/64db.t
+++ b/t/64db.t
@@ -1,8 +1,10 @@
+BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
+
 use strict;
 use warnings;
 
 use Test::More;
-use lib qw(t/lib);
+
 use DBICTest;
 
 my $schema = DBICTest->init_schema();
@@ -13,7 +15,7 @@ plan tests => 4;
 # XXX: Is storage->dbh the only way to get a dbh?
 $schema->storage->txn_begin;
 for (10..15) {
-    $schema->resultset("Artist")->create( { 
+    $schema->resultset("Artist")->create( {
         artistid => $_,
         name => "artist number $_",
     } );
@@ -31,7 +33,7 @@ for (21..30) {
     } );
 }
 $schema->storage->txn_rollback;
-($artist) = $schema->resultset("Artist")->search( artistid => 25 );
+($artist) = $schema->resultset("Artist")->search({ artistid => 25 });
 is($artist, undef, "Rollback ok");
 
 is_deeply (
@@ -62,7 +64,7 @@ is_deeply (
       'rank' => {
           'data_type' => 'integer',
           'is_nullable' => 0,
-          'default_value' => '13',
+          DBIx::Class::_ENV_::STRESSTEST_COLUMN_INFO_UNAWARE_STORAGE ? () : ( 'default_value' => '13' ),
       },
       'charfield' => {
           'data_type' => 'char',