Introduce GOVERNANCE document and empty RESOLUTIONS file.
[dbsrgits/DBIx-Class.git] / t / 34exception_action.t
index d326bf7..aa803eb 100644 (file)
@@ -6,6 +6,7 @@ use warnings;
 use Test::More;
 use Test::Exception;
 use Test::Warn;
+use Scalar::Util 'weaken';
 
 use DBICTest;
 
@@ -118,4 +119,19 @@ for my $ap (qw(
   } $exp_warn, 'Proper warning on encountered antipattern';
 }
 
+# ensure we do not get into an infloop
+{
+  weaken( my $s = $schema );
+
+  $schema->exception_action(sub{
+    $s->throw_exception(@_)
+  });
+
+  throws_ok {
+    $schema->storage->dbh_do(sub {
+      $_[1]->do('wgwfwfwghawhjsejsethjwetjesjesjsejsetjes')
+    } )
+  } qr/syntax error/i;
+}
+
 done_testing;