Static::Simple 0.18
[catagits/Catalyst-Plugin-Static-Simple.git] / t / 11serve_static.t
CommitLineData
ab02ca0d 1#!perl
2
3use strict;
4use warnings;
5
6use FindBin;
7use lib "$FindBin::Bin/lib";
8
9use Test::More tests => 6;
10use Catalyst::Test 'TestApp';
11
12# test getting a file via serve_static_file
13ok( my $res = request('http://localhost/serve_static'), 'request ok' );
14is( $res->code, 200, '200 ok' );
15is( $res->content_type, 'application/x-pagemaker', 'content-type ok' );
16like( $res->content, qr/serve_static/, 'content of serve_static ok' );
17
18# test getting a non-existant file via serve_static_file
19ok( $res = request('http://localhost/serve_static_404'), 'request ok' );
20is( $res->code, 404, '404 ok' );