Fix test
[catagits/Catalyst-Runtime.git] / t / aggregate / utf8_content_length.t
CommitLineData
5ab21903 1use strict;
2use warnings;
3use FindBin qw/$Bin/;
4use lib "$Bin/../lib";
5use File::Spec;
6use Test::More;
7
8use Catalyst::Test qw/TestAppEncoding/;
9
10if ( $ENV{CATALYST_SERVER} ) {
11 plan skip_all => 'This test does not run live';
12 exit 0;
13}
14
15my $fn = "$Bin/../catalyst_130pix.gif";
16ok -r $fn, 'Can read catalyst_130pix.gif';
17my $size = -s $fn;
18{
19 my $r = request('/binary');
20 is $r->code, 200, '/binary OK';
21 is $r->header('Content-Length'), $size, '/binary correct content length';
22}
23{
24 my $r = request('/binary_utf8');
25 is $r->code, 200, '/binary_utf8 OK';
26 is $r->header('Content-Length'), $size, '/binary_utf8 correct content length';
27}
28
29done_testing;
30