X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Faggregate%2Flive_component_controller_action_streaming.t;h=e14b9284745c1b2b449cdfb99ecb569a2f6e4ff2;hb=a0b5065e3dd43fea2ca17f4f2ae7cbe1958057d4;hp=1bc9cbf198f5c7dd18da90b77357f39a03cb3c57;hpb=9c74923de2304b8c8f0a7a2faa0854ad9b4d3a92;p=catagits%2FCatalyst-Runtime.git diff --git a/t/aggregate/live_component_controller_action_streaming.t b/t/aggregate/live_component_controller_action_streaming.t index 1bc9cbf..e14b928 100644 --- a/t/aggregate/live_component_controller_action_streaming.t +++ b/t/aggregate/live_component_controller_action_streaming.t @@ -1,5 +1,3 @@ -#!perl - use strict; use warnings; @@ -29,6 +27,8 @@ sub run_tests { ok( my $response = request('http://localhost/streaming'), 'Request' ); ok( $response->is_success, 'Response Successful 2xx' ); is( $response->content_type, 'text/plain', 'Response Content-Type' ); + is( $response->header('X-Test-Header'), 'valid', 'Headers sent properly' ); + is( $response->header('X-Test-Header-Call-Count'), 1); SKIP: { @@ -67,6 +67,8 @@ EOF ok( $response->is_success, 'Response Successful 2xx' ); is( $response->content_type, 'text/plain', 'Response Content-Type' ); is( $response->content_length, -s $file, 'Response Content-Length' ); + is( $response->header('X-Test-Header'), 'valid', 'Headers sent properly' ); + is( $response->header('X-Test-Header-Call-Count'), 1); is( $response->content, $buffer, 'Content is read from filehandle' ); ok( $response = request('http://localhost/action/streaming/body_glob'), @@ -74,6 +76,8 @@ EOF ok( $response->is_success, 'Response Successful 2xx' ); is( $response->content_type, 'text/plain', 'Response Content-Type' ); is( $response->content_length, -s $file, 'Response Content-Length' ); + is( $response->header('X-Test-Header'), 'valid', 'Headers sent properly' ); + is( $response->header('X-Test-Header-Call-Count'), 1); is( $response->content, $buffer, 'Content is read from filehandle' ); } @@ -83,6 +87,8 @@ EOF ok( my $response = request('http://localhost/action/streaming/body_large'), 'Request' ); ok( $response->is_success, 'Response Successful 2xx' ); is( $response->content_type, 'text/plain', 'Response Content-Type' ); + is( $response->header('X-Test-Header'), 'valid', 'Headers sent properly' ); + is( $response->header('X-Test-Header-Call-Count'), 1); is( $response->content_length, $size, 'Response Content-Length' ); is( $response->content, "\0" x $size, 'Content is read from filehandle' ); }