first cut at :ChildOf
[catagits/Catalyst-Runtime.git] / t / live_engine_response_large.t
CommitLineData
fbcc39ad 1#!perl\r
2\r
3use strict;\r
4use warnings;\r
5\r
6use FindBin;\r
a2e038a1 7use lib "$FindBin::Bin/lib";\r
fbcc39ad 8\r
9use Test::More tests => 6;\r
10use Catalyst::Test 'TestApp';\r
11\r
12# phaylon noticed that refactored was truncating output on large images.\r
13# This test tests 100K and 1M output content.\r
14\r
15my $expected = {\r
16 one => 'x' x (100 * 1024),\r
17 two => 'y' x (1024 * 1024),\r
18};\r
19\r
20for my $action ( keys %{$expected} ) {\r
21 ok( my $response = request('http://localhost/engine/response/large/' . $action ),\r
22 'Request' );\r
23 ok( $response->is_success, 'Response Successful 2xx' );\r
24 \r
25 is( length( $response->content ), length( $expected->{$action} ), 'Length OK' );\r
26}\r
27\r