Fixed second bug
[catagits/Catalyst-Runtime.git] / t / live / component / controller / action / begin.t
CommitLineData
fbcc39ad 1#!perl
2
3use strict;
4use warnings;
5
6use FindBin;
7use lib "$FindBin::Bin/../../../lib";
8
9use Test::More tests => 7;
10use Catalyst::Test 'TestApp';
11
12{
13 my @expected = qw[
14 TestApp::Controller::Action::Begin->begin
15 TestApp::Controller::Action::Begin->default
16 TestApp::View::Dump::Request->process
17 ];
18
19 my $expected = join( ", ", @expected );
20
21 ok( my $response = request('http://localhost/action/begin'), 'Request' );
22 ok( $response->is_success, 'Response Successful 2xx' );
23 is( $response->content_type, 'text/plain', 'Response Content-Type' );
24 is( $response->header('X-Catalyst-Action'), 'default', 'Test Action' );
25 is(
26 $response->header('X-Test-Class'),
27 'TestApp::Controller::Action::Begin',
28 'Test Class'
29 );
30 is( $response->header('X-Catalyst-Executed'),
31 $expected, 'Executed actions' );
32 like( $response->content, qr/'Catalyst::Request'/,
33 'Content is a serialized Catalyst::Request' );
34}