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