Protect DBIC as best we can from the failure mode in 7cb35852
[dbsrgits/DBIx-Class.git] / t / 61findnot.t
index 89070ce..ab709e3 100644 (file)
@@ -53,7 +53,11 @@ for my $key ('', 'primary') {
 }
 
 # collapsing and non-collapsing are separate codepaths, thus the separate tests
-
+my $ea_count = 0;
+$schema->exception_action(sub {
+  $ea_count++;
+  die @_;
+});
 
 $artist_rs = $schema->resultset("Artist");
 
@@ -79,6 +83,10 @@ for (1, 0) {
   ;
 }
 
+is( $ea_count, 1, "exception action invoked the expected amount of times (just the exception)" );
+
+$schema->exception_action(undef);
+
 
 $artist_rs = $schema->resultset("Artist")->search({}, { prefetch => 'cds' });