X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F33exception_wrap.t;h=0acc6901f7906420b4e693878eed004b40388de8;hb=1cf2ad8b;hp=40a7ea052a80528fe7b94c19f6dc503497745423;hpb=84e4e006430911fb5aa1d73d8a760bf4455a6378;p=dbsrgits%2FDBIx-Class.git diff --git a/t/33exception_wrap.t b/t/33exception_wrap.t index 40a7ea0..0acc690 100644 --- a/t/33exception_wrap.t +++ b/t/33exception_wrap.t @@ -1,3 +1,5 @@ +BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) } + use strict; use warnings; @@ -5,8 +7,6 @@ use Test::More; use Test::Exception; use Test::Warn; -use lib qw(t/lib); - use DBICTest; my $schema = DBICTest->init_schema; @@ -38,6 +38,15 @@ for my $ap (qw( isa_ok $@, $ap; } qr/\QObjects of external exception class '$ap' stringify to '' (the empty string)/, 'Proper warning on encountered antipattern'; + + warnings_are { + $@ = $ap->new; + $schema->txn_do (sub { 1 }); + + $@ = $ap->new; + $schema->txn_scope_guard->commit; + } [], 'No spurious PSA warnings on pre-existing antipatterns in $@'; + } done_testing;