Added tests for passing filehandle to res->body
[catagits/Catalyst-Runtime.git] / t / live / lib / TestApp / Controller / Action / Streaming.pm
index 9ad394c..775eaba 100644 (file)
@@ -14,4 +14,17 @@ EOF
     }
 }
 
+sub body : Local {
+    my ( $self, $c ) = @_;
+    
+    my $file = "$FindBin::Bin/../../../../01use.t";
+    my $fh = IO::File->new( $file, 'r' );
+    if ( defined $fh ) {
+        $c->res->body( $fh );
+    }
+    else {
+        $c->res->body( "Unable to read $file" );
+    }
+}
+
 1;