Commit | Line | Data |
5ab21903 |
1 | use strict; |
2 | use warnings; |
3 | use FindBin qw/$Bin/; |
4 | use lib "$Bin/../lib"; |
5 | use File::Spec; |
6 | use Test::More; |
7 | |
2e4a8275 |
8 | BEGIN { delete $ENV{CATALYST_HOME} } |
9 | |
5ab21903 |
10 | use Catalyst::Test qw/TestAppEncoding/; |
11 | |
12 | if ( $ENV{CATALYST_SERVER} ) { |
13 | plan skip_all => 'This test does not run live'; |
14 | exit 0; |
15 | } |
16 | |
17 | my $fn = "$Bin/../catalyst_130pix.gif"; |
18 | ok -r $fn, 'Can read catalyst_130pix.gif'; |
19 | my $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 | |
31 | done_testing; |
32 | |