7 use lib "$FindBin::Bin/../../../lib";
9 use Test::More tests => 90;
10 use Catalyst::Test 'TestApp';
15 TestApp::Controller::Action::Default->begin
16 TestApp::Controller::Action::Default->default
17 TestApp::View::Dump::Request->process
20 my $expected = join( ", ", @expected );
22 ok( my $response = request('http://localhost/action/default'),
24 ok( $response->is_success, 'Response Successful 2xx' );
25 is( $response->content_type, 'text/plain', 'Response Content-Type' );
26 is( $response->header('X-Catalyst-Action'), 'default', 'Test Action' );
28 $response->header('X-Test-Class'),
29 'TestApp::Controller::Action::Default',
32 is( $response->header('X-Catalyst-Executed'),
33 $expected, 'Executed actions' );
36 qr/^bless\( .* 'Catalyst::Request' \)$/s,
37 'Content is a serialized Catalyst::Request'
40 ok( $response = request('http://localhost/foo/bar/action'), 'Request' );
41 is( $response->code, 404, 'Invalid URI returned 404' );