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