X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fresultset%2Finflate_result_api.t;h=d4a0f8e3d83d06f4d2dd3438be783ca0d31c9c68;hb=e10d9d292bb2b14a31b45f36bd25b6610bd2e71d;hp=e09bad18e509137a094dbc30fbcf8d8aa9e1cc3c;hpb=9ceb04c6a5a6de6e11009e1f58e387a77c618284;p=dbsrgits%2FDBIx-Class.git diff --git a/t/resultset/inflate_result_api.t b/t/resultset/inflate_result_api.t index e09bad1..d4a0f8e 100644 --- a/t/resultset/inflate_result_api.t +++ b/t/resultset/inflate_result_api.t @@ -6,6 +6,7 @@ no warnings 'exiting'; use Test::More; use Test::Deep; +use Test::Exception; use DBICTest; @@ -548,6 +549,7 @@ sub cmp_structures { cmp_deeply($left, $right, $msg||()) or next INFTYPE; } + { package DBICTest::_DoubleResult; @@ -575,4 +577,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;