7 use lib "$FindBin::Bin/../../lib";
9 use Test::More no_plan => 1;
10 use Catalyst::Test 'TestApp';
15 TestApp::Controller::Action::Inheritance->begin
16 TestApp::Controller::Action::Inheritance->default
17 TestApp::View::Dump::Request->process
18 TestApp::Controller::Action::Inheritance->end
21 my $expected = join( ", ", @expected );
23 ok( my $response = request('http://localhost/action/inheritance'), 'Request' );
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' );
27 is( $response->header('X-Test-Class'), 'TestApp::Controller::Action::Inheritance', 'Test Class' );
28 is( $response->header('X-Catalyst-Executed'), $expected, 'Executed actions' );
29 like( $response->content, qr/^bless\( .* 'Catalyst::Request' \)$/s, 'Content is a serialized Catalyst::Request' );
34 TestApp::Controller::Action::Inheritance::A->begin
35 TestApp::Controller::Action::Inheritance::A->default
36 TestApp::View::Dump::Request->process
37 TestApp::Controller::Action::Inheritance::A->end
40 my $expected = join( ", ", @expected );
42 ok( my $response = request('http://localhost/action/inheritance/a'), 'Request' );
43 ok( $response->is_success, 'Response Successful 2xx' );
44 is( $response->content_type, 'text/plain', 'Response Content-Type' );
45 is( $response->header('X-Catalyst-Action'), 'default', 'Test Action' );
46 is( $response->header('X-Test-Class'), 'TestApp::Controller::Action::Inheritance::A', 'Test Class' );
47 is( $response->header('X-Catalyst-Executed'), $expected, 'Executed actions' );
48 like( $response->content, qr/^bless\( .* 'Catalyst::Request' \)$/s, 'Content is a serialized Catalyst::Request' );
53 TestApp::Controller::Action::Inheritance::A::B->begin
54 TestApp::Controller::Action::Inheritance::A::B->default
55 TestApp::View::Dump::Request->process
56 TestApp::Controller::Action::Inheritance::A::B->end
59 my $expected = join( ", ", @expected );
61 ok( my $response = request('http://localhost/action/inheritance/a/b'), 'Request' );
62 ok( $response->is_success, 'Response Successful 2xx' );
63 is( $response->content_type, 'text/plain', 'Response Content-Type' );
64 is( $response->header('X-Catalyst-Action'), 'default', 'Test Action' );
65 is( $response->header('X-Test-Class'), 'TestApp::Controller::Action::Inheritance::A::B', 'Test Class' );
66 is( $response->header('X-Catalyst-Executed'), $expected, 'Executed actions' );
67 like( $response->content, qr/^bless\( .* 'Catalyst::Request' \)$/s, 'Content is a serialized Catalyst::Request' );