first post on australorp
[catagits/Catalyst-Runtime.git] / t / arg_constraints.t
1 use warnings;
2 use strict;
3 use Test::More;
4 use HTTP::Request::Common;
5
6 {
7   package MyApp::Controller::Root;
8   $INC{'MyApp/Controller/Root.pm'} = __FILE__;
9
10   use Moose;
11   use MooseX::MethodAttributes;
12
13   extends 'Catalyst::Controller';
14
15   sub check :Local {
16     pop->res->from_psgi_response([200, ['Content-Type'=>'text/plain'],['check']]);
17   }
18
19   MyApp::Controller::Root->config(namespace=>'');
20
21   package MyApp;
22   use Catalyst;
23
24   MyApp->setup;
25 }
26
27 use Catalyst::Test 'MyApp';
28
29 {
30   my $res = request '/check';
31   is $res->code, 200, 'OK';
32   is $res->content, 'check', 'correct body';
33   is $res->content_length, 5, 'correct length';
34 }
35
36 done_testing;