7 use lib "$FindBin::Bin/../../../lib";
9 use Test::More tests => 210;
10 use Catalyst::Test 'TestApp';
15 TestApp::Controller::Action::Inheritance->begin
16 TestApp::Controller::Action::Inheritance->auto
17 TestApp::Controller::Action::Inheritance->default
18 TestApp::View::Dump::Request->process
19 TestApp::Controller::Action::Inheritance->end
22 my $expected = join( ", ", @expected );
24 ok( my $response = request('http://localhost/action/inheritance'),
26 ok( $response->is_success, 'Response Successful 2xx' );
27 is( $response->content_type, 'text/plain', 'Response Content-Type' );
28 is( $response->header('X-Catalyst-Action'), 'default', 'Test Action' );
30 $response->header('X-Test-Class'),
31 'TestApp::Controller::Action::Inheritance',
34 is( $response->header('X-Catalyst-Executed'),
35 $expected, 'Executed actions' );
38 qr/^bless\( .* 'Catalyst::Request' \)$/s,
39 'Content is a serialized Catalyst::Request'
45 TestApp::Controller::Action::Inheritance::A->begin
46 TestApp::Controller::Action::Inheritance->auto
47 TestApp::Controller::Action::Inheritance::A->auto
48 TestApp::Controller::Action::Inheritance::A->default
49 TestApp::View::Dump::Request->process
50 TestApp::Controller::Action::Inheritance::A->end
53 my $expected = join( ", ", @expected );
55 ok( my $response = request('http://localhost/action/inheritance/a'),
57 ok( $response->is_success, 'Response Successful 2xx' );
58 is( $response->content_type, 'text/plain', 'Response Content-Type' );
59 is( $response->header('X-Catalyst-Action'), 'default', 'Test Action' );
61 $response->header('X-Test-Class'),
62 'TestApp::Controller::Action::Inheritance::A',
65 is( $response->header('X-Catalyst-Executed'),
66 $expected, 'Executed actions' );
69 qr/^bless\( .* 'Catalyst::Request' \)$/s,
70 'Content is a serialized Catalyst::Request'
76 TestApp::Controller::Action::Inheritance::A::B->begin
77 TestApp::Controller::Action::Inheritance->auto
78 TestApp::Controller::Action::Inheritance::A->auto
79 TestApp::Controller::Action::Inheritance::A::B->auto
80 TestApp::Controller::Action::Inheritance::A::B->default
81 TestApp::View::Dump::Request->process
82 TestApp::Controller::Action::Inheritance::A::B->end
85 my $expected = join( ", ", @expected );
87 ok( my $response = request('http://localhost/action/inheritance/a/b'),
89 ok( $response->is_success, 'Response Successful 2xx' );
90 is( $response->content_type, 'text/plain', 'Response Content-Type' );
91 is( $response->header('X-Catalyst-Action'), 'default', 'Test Action' );
93 $response->header('X-Test-Class'),
94 'TestApp::Controller::Action::Inheritance::A::B',
97 is( $response->header('X-Catalyst-Executed'),
98 $expected, 'Executed actions' );
101 qr/^bless\( .* 'Catalyst::Request' \)$/s,
102 'Content is a serialized Catalyst::Request'