7 use lib "$FindBin::Bin/../../../lib";
9 use Test::More tests => 240;
10 use Catalyst::Test 'TestApp';
14 ok( my $response = request('http://localhost/action/local/one'),
16 ok( $response->is_success, 'Response Successful 2xx' );
17 is( $response->content_type, 'text/plain', 'Response Content-Type' );
18 is( $response->header('X-Catalyst-Action'),
19 'action/local/one', 'Test Action' );
21 $response->header('X-Test-Class'),
22 'TestApp::Controller::Action::Local',
27 qr/^bless\( .* 'Catalyst::Request' \)$/s,
28 'Content is a serialized Catalyst::Request'
33 ok( my $response = request('http://localhost/action/local/two'),
35 ok( $response->is_success, 'Response Successful 2xx' );
36 is( $response->content_type, 'text/plain', 'Response Content-Type' );
37 is( $response->header('X-Catalyst-Action'),
38 'action/local/two', 'Test Action' );
40 $response->header('X-Test-Class'),
41 'TestApp::Controller::Action::Local',
46 qr/^bless\( .* 'Catalyst::Request' \)$/s,
47 'Content is a serialized Catalyst::Request'
52 ok( my $response = request('http://localhost/action/local/three'),
54 ok( $response->is_success, 'Response Successful 2xx' );
55 is( $response->content_type, 'text/plain', 'Response Content-Type' );
56 is( $response->header('X-Catalyst-Action'),
57 'action/local/three', 'Test Action' );
59 $response->header('X-Test-Class'),
60 'TestApp::Controller::Action::Local',
65 qr/^bless\( .* 'Catalyst::Request' \)$/s,
66 'Content is a serialized Catalyst::Request'
73 request('http://localhost/action/local/four/five/six'),
76 ok( $response->is_success, 'Response Successful 2xx' );
77 is( $response->content_type, 'text/plain', 'Response Content-Type' );
78 is( $response->header('X-Catalyst-Action'),
79 'action/local/four/five/six', 'Test Action' );
81 $response->header('X-Test-Class'),
82 'TestApp::Controller::Action::Local',
87 qr/^bless\( .* 'Catalyst::Request' \)$/s,
88 'Content is a serialized Catalyst::Request'