From: Andy Grundman Date: Mon, 2 Jul 2007 21:31:53 +0000 (+0000) Subject: Static::Simple 0.19, fixed a test that fails on some systems X-Git-Tag: v0.21~12 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Plugin-Static-Simple.git;a=commitdiff_plain;h=755bd82233f2d5f6251c70a5ea6893b13044022a Static::Simple 0.19, fixed a test that fails on some systems --- diff --git a/Changes b/Changes index 9787992..a254033 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,9 @@ Revision history for Perl extension Catalyst::Plugin::Static::Simple +0.19 2007-07-02 17:00:00 + - Fixed test failure on some systems in 11serve_static.t due to + multiple MIME types defined for the extension '.pm'. + 0.18 2007-07-01 00:15:00 - Logging may now be enabled with the less confusing MyApp->config->{static}->{logging} = 1; diff --git a/lib/Catalyst/Plugin/Static/Simple.pm b/lib/Catalyst/Plugin/Static/Simple.pm index 7f9ab73..95de6b0 100644 --- a/lib/Catalyst/Plugin/Static/Simple.pm +++ b/lib/Catalyst/Plugin/Static/Simple.pm @@ -8,7 +8,7 @@ use File::Spec (); use IO::File (); use MIME::Types (); -our $VERSION = '0.18'; +our $VERSION = '0.19'; __PACKAGE__->mk_accessors( qw/_static_file _static_debug_message/ ); diff --git a/t/11serve_static.t b/t/11serve_static.t index da17d5a..470b72c 100644 --- a/t/11serve_static.t +++ b/t/11serve_static.t @@ -12,7 +12,8 @@ use Catalyst::Test 'TestApp'; # test getting a file via serve_static_file ok( my $res = request('http://localhost/serve_static'), 'request ok' ); is( $res->code, 200, '200 ok' ); -is( $res->content_type, 'application/x-pagemaker', 'content-type ok' ); +# .pm can be both application/x-pagemaker or text/x-perl, so only check for a slash +like( $res->content_type, qr{/}, 'content-type ok' ); like( $res->content, qr/serve_static/, 'content of serve_static ok' ); # test getting a non-existant file via serve_static_file