Commit | Line | Data |
e37ad815 |
1 | #!perl\r |
2 | \r |
3 | use strict;\r |
4 | use warnings;\r |
5 | \r |
6 | use FindBin;\r |
7 | use lib "$FindBin::Bin/lib";\r |
8 | \r |
9 | use Test::More tests => 4;\r |
10 | use Catalyst::Test 'TestApp';\r |
11 | \r |
12 | # test custom MIME types\r |
ee1e7faf |
13 | TestApp->config->{'Plugin::Static::Simple'}->{mime_types} = {\r |
e37ad815 |
14 | omg => 'holy/crap',\r |
15 | gif => 'patents/are-evil',\r |
16 | };\r |
17 | \r |
18 | ok( my $res = request('http://localhost/files/err.omg'), 'request ok' );\r |
19 | is( $res->content_type, 'holy/crap', 'custom MIME type ok' );\r |
20 | \r |
21 | ok( $res = request('http://localhost/files/bad.gif'), 'request ok' );\r |
22 | is( $res->content_type, 'patents/are-evil', 'custom MIME type overlay ok' );\r |