added test for ->view() with one view not returning a blessed instance
[catagits/Catalyst-Runtime.git] / t / lib / TestAppOneView / Controller / Root.pm
1 package TestAppOneView::Controller::Root;
2
3 use base 'Catalyst::Controller';
4 use Scalar::Util ();
5
6 __PACKAGE__->config->{namespace} = '';
7
8 sub view_no_args : Local {
9     my ( $self, $c ) = @_;
10
11     my $v = $c->view;
12
13     $c->res->body(Scalar::Util::blessed($v));
14 }
15
16 sub view_by_name : Local {
17     my ( $self, $c ) = @_;
18
19     my $v = $c->view($c->req->param('view'));
20
21     $c->res->body(Scalar::Util::blessed($v));
22 }
23
24 1;