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