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 | |
8 | use Catalyst::Test qw/TestAppEncoding/; |
9 | |
10 | if ( $ENV{CATALYST_SERVER} ) { |
11 | plan skip_all => 'This test does not run live'; |
12 | exit 0; |
13 | } |
14 | |
15 | my $fn = "$Bin/../catalyst_130pix.gif"; |
16 | ok -r $fn, 'Can read catalyst_130pix.gif'; |
17 | my $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 | } |
4f555202 |
23 | { |
5ab21903 |
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 | |
29 | done_testing; |
30 | |