X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F61findnot.t;h=e9fe1ac755a20477a8746e8f03dae04f6eb1dcd9;hb=c356fcb1919c92e9f9b1dfe9fcc4c4cd33dc5ad6;hp=89070ce6e9cbce592a56a204e97967c89f7753e4;hpb=d681f1bb0ca3b0611f11c082059827cfda7f9ac5;p=dbsrgits%2FDBIx-Class.git diff --git a/t/61findnot.t b/t/61findnot.t index 89070ce..e9fe1ac 100644 --- a/t/61findnot.t +++ b/t/61findnot.t @@ -1,10 +1,12 @@ +BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) } + use strict; use warnings; use Test::More; use Test::Warn; use Test::Exception; -use lib qw(t/lib); + use DBICTest; my $schema = DBICTest->init_schema(); @@ -53,7 +55,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 +85,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' });