+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();
}
# 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");
;
}
+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' });