fix sybase fail, add more diagnostics for firebird blob fail
[dbsrgits/DBIx-Class.git] / t / 105view_deps.t
index d53dc79..a2e5485 100644 (file)
@@ -5,11 +5,16 @@ use warnings;
 
 use Test::More;
 use Test::Exception;
+use Test::Warn;
 use lib qw(t/lib);
 use ViewDeps;
 use ViewDepsBad;
 
 BEGIN {
+    require DBIx::Class;
+    plan skip_all => 'Test needs '
+        . DBIx::Class::Optional::Dependencies->req_missing_for('deploy')
+        unless DBIx::Class::Optional::Dependencies->req_ok_for('deploy');
     use_ok('DBIx::Class::ResultSource::View');
 }
 
@@ -65,7 +70,9 @@ ok( $schema2, 'Connected to ViewDepsBad schema OK' );
 
 #################### DEPLOY2
 
-$schema2->deploy( { add_drop_table => 1 } );
+warnings_exist { $schema2->deploy( { add_drop_table => 1 } ); }
+[qr/no such table: main.aba_name_artists/],
+    "Deploying the bad schema produces a warning: aba_name_artists was not created.";
 
 #################### DOES ORDERING WORK 2?