Fix *stupid* silencing of exceptions introduced in 4e9fc3f3
[dbsrgits/DBIx-Class.git] / t / resultset / inflate_result_api.t
index e09bad1..d4a0f8e 100644 (file)
@@ -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;