5 # Test case for reported issue when an action consumes JSON but a
6 # POST sends nothing we get a hard error
9 package MyApp::Controller::Root;
10 $INC{'MyApp/Controller/Root.pm'} = __FILE__;
12 use base 'Catalyst::Controller';
14 sub test :Local Args(0) {
16 my $view = $c->view('Test');
19 Test::More::is("$view", "@{[ $c->res->body]}");
22 package MyApp::View::Test;
23 $INC{'MyApp/View/Test.pm'} = __FILE__;
25 use base 'Catalyst::View';
28 my ($self, $c, @args) = @_;
29 return ref($self)->new;
33 my ($self, $c, @args) = @_;
34 $c->res->body("$self");
43 use HTTP::Request::Common;
44 use Catalyst::Test 'MyApp';
47 ok my $res = request GET 'root/test';