X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flive_engine_response_large.t;h=86665f2694949a4d451443145835f8f32c57b0bc;hb=f04fdedae056296d0fa97fbdcaa85b9811ca6a5b;hp=0d244434264249ea44f7781ab950d5217bbb777d;hpb=33970ffa4d636ddb9af263fa6648929d7fef0c9c;p=catagits%2FCatalyst-Runtime.git diff --git a/t/live_engine_response_large.t b/t/live_engine_response_large.t index 0d24443..86665f2 100644 --- a/t/live_engine_response_large.t +++ b/t/live_engine_response_large.t @@ -1,27 +1,27 @@ -#!perl - -use strict; -use warnings; - -use FindBin; -use lib "$FindBin::Bin/lib"; - -use Test::More tests => 6; -use Catalyst::Test 'TestApp'; - -# phaylon noticed that refactored was truncating output on large images. -# This test tests 100K and 1M output content. - -my $expected = { - one => 'x' x (100 * 1024), - two => 'y' x (1024 * 1024), -}; - -for my $action ( keys %{$expected} ) { - ok( my $response = request('http://localhost/engine/response/large/' . $action ), - 'Request' ); - ok( $response->is_success, 'Response Successful 2xx' ); - - is( length( $response->content ), length( $expected->{$action} ), 'Length OK' ); -} - +#!perl + +use strict; +use warnings; + +use FindBin; +use lib "$FindBin::Bin/lib"; + +use Test::More tests => 6; +use Catalyst::Test 'TestApp'; + +# phaylon noticed that refactored was truncating output on large images. +# This test tests 100K and 1M output content. + +my $expected = { + one => 'x' x (100 * 1024), + two => 'y' x (1024 * 1024), +}; + +for my $action ( keys %{$expected} ) { + ok( my $response = request('http://localhost/engine/response/large/' . $action ), + 'Request' ); + ok( $response->is_success, 'Response Successful 2xx' ); + + is( length( $response->content ), length( $expected->{$action} ), 'Length OK' ); +} +