more utf8 tests and fixes
[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
2e4a8275 8BEGIN { delete $ENV{CATALYST_HOME} }
9
5ab21903 10use Catalyst::Test qw/TestAppEncoding/;
11
12if ( $ENV{CATALYST_SERVER} ) {
13 plan skip_all => 'This test does not run live';
14 exit 0;
15}
16
17my $fn = "$Bin/../catalyst_130pix.gif";
18ok -r $fn, 'Can read catalyst_130pix.gif';
19my $size = -s $fn;
20{
21 my $r = request('/binary');
22 is $r->code, 200, '/binary OK';
23 is $r->header('Content-Length'), $size, '/binary correct content length';
24}
25{
26 my $r = request('/binary_utf8');
27 is $r->code, 200, '/binary_utf8 OK';
28 is $r->header('Content-Length'), $size, '/binary_utf8 correct content length';
29}
30
31done_testing;