[Catalyst-commits] r6758 - in trunk/Catalyst-View-Mason/t: . lib
rafl at dev.catalyst.perl.org
rafl at dev.catalyst.perl.org
Tue Aug 28 16:58:58 GMT 2007
Author: rafl
Date: 2007-08-28 16:58:56 +0100 (Tue, 28 Aug 2007)
New Revision: 6758
Modified:
trunk/Catalyst-View-Mason/t/content_type.t
trunk/Catalyst-View-Mason/t/lib/TestApp.pm
Log:
Test that the content type isn't overwritten if already set.
Modified: trunk/Catalyst-View-Mason/t/content_type.t
===================================================================
--- trunk/Catalyst-View-Mason/t/content_type.t 2007-08-28 15:58:53 UTC (rev 6757)
+++ trunk/Catalyst-View-Mason/t/content_type.t 2007-08-28 15:58:56 UTC (rev 6758)
@@ -2,7 +2,7 @@
use strict;
use warnings;
-use Test::More tests => 3;
+use Test::More tests => 5;
use FindBin;
use lib "$FindBin::Bin/lib";
@@ -13,3 +13,7 @@
ok($response->is_success, 'request ok');
is($response->header('content-type'), 'text/html; charset=utf-8', 'default content type ok');
+
+$response = request('/test_content_type');
+ok($response->is_success, 'request ok');
+is($response->header('content-type'), 'text/html; charset=iso8859-1', 'content type ok');
Modified: trunk/Catalyst-View-Mason/t/lib/TestApp.pm
===================================================================
--- trunk/Catalyst-View-Mason/t/lib/TestApp.pm 2007-08-28 15:58:53 UTC (rev 6757)
+++ trunk/Catalyst-View-Mason/t/lib/TestApp.pm 2007-08-28 15:58:56 UTC (rev 6758)
@@ -24,6 +24,16 @@
$c->stash->{message} = ($c->request->param('message') || $c->config->{default_message});
}
+sub test_content_type : Local {
+ my ($self, $c) = @_;
+
+ $c->forward('test');
+
+ $c->stash->{template} = 'test';
+
+ $c->response->content_type('text/html; charset=iso8859-1')
+}
+
sub exception : Local {
my ($self, $c) = @_;
More information about the Catalyst-commits
mailing list