new config attr that lets you override the default content type
[catagits/Catalyst-View-TT.git] / t / lib / TestApp / Controller / Root.pm
index 41a0d46..7d612c2 100644 (file)
@@ -12,6 +12,7 @@ sub test : Local {
     my ($self, $c) = @_;
 
     $c->stash->{message} = ($c->request->param('message') || $c->config->{default_message});
+    $c->stash->{template} = $c->request->param('template');
 }
 
 sub test_includepath : Local {
@@ -47,11 +48,17 @@ sub test_render : Local {
 sub test_msg : Local {
     my ($self, $c) = @_;
     my $tmpl = $c->req->param('msg');
-    
-    $c->stash->{message} = $c->view('TT::AppConfig')->render($c, \$tmpl);
+
+    $c->stash->{message} = $c->view('TT::Appconfig')->render($c, \$tmpl);
     $c->stash->{template} = 'test.tt';
 }
 
+sub test_alt_content_type : Local {
+    my ($self, $c) = @_;
+    $c->stash( message => 'test_alt_content_type');
+    $c->forward('View::TT::AltContentType');
+}
+
 sub end : Private {
     my ($self, $c) = @_;