X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fresultset%2Finflate_result_api.t;fp=t%2Fresultset%2Finflate_result_api.t;h=29daa6b72dfb7229636e54fb915f0057386c7939;hb=0844bb396f5702db73a8eea947116475b4d89e9a;hp=e6bedc2b148b136e0d1c20458a4967b7bb3acb75;hpb=2bbdb85a47bab6c27ddf44e0a3a77224ba5242d8;p=dbsrgits%2FDBIx-Class.git diff --git a/t/resultset/inflate_result_api.t b/t/resultset/inflate_result_api.t index e6bedc2..29daa6b 100644 --- a/t/resultset/inflate_result_api.t +++ b/t/resultset/inflate_result_api.t @@ -5,6 +5,8 @@ no warnings 'exiting'; use Test::More; use Test::Deep; use lib qw(t/lib); +use Test::Exception; + use DBICTest; my $schema = DBICTest->init_schema(no_populate => 1); @@ -502,6 +504,7 @@ sub cmp_structures { cmp_deeply($left, $right, $msg||()) or next INFTYPE; } + { package DBICTest::_DoubleResult; @@ -529,4 +532,18 @@ is_deeply( })->all_hri}) x 2 ], ); + +{ + package DBICTest::_DieTrying; + + sub inflate_result { + die "nyah nyah nyah"; + } +} + +throws_ok { + $schema->resultset('CD')->search({}, { result_class => 'DBICTest::_DieTrying' })->all +} qr/nyah nyah nyah/, 'Exception in custom inflate_result propagated correctly'; + + done_testing;