X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fcomponent%2Fcontroller%2Faction%2Fforward.t;fp=t%2Fcomponent%2Fcontroller%2Faction%2Fforward.t;h=fe2bd3a203dd6096a8b01de68fc706252437cdf6;hb=a1c8f974699a855b480845bb0e0afb570f346e99;hp=58355af4bd717e659b6b8f709485383c8b1f1f75;hpb=71c3bcc37c15d47d5070525780876daf38309d9a;p=catagits%2FCatalyst-Runtime.git diff --git a/t/component/controller/action/forward.t b/t/component/controller/action/forward.t index 58355af..fe2bd3a 100644 --- a/t/component/controller/action/forward.t +++ b/t/component/controller/action/forward.t @@ -6,7 +6,7 @@ use warnings; use FindBin; use lib "$FindBin::Bin/../../../lib"; -use Test::More tests => 24; +use Test::More tests => 31; use Catalyst::Test 'TestApp'; @@ -41,6 +41,24 @@ use Catalyst::Test 'TestApp'; { my @expected = qw[ TestApp::Controller::Action::Forward->begin + TestApp::Controller::Action::Forward->six + TestApp::View::Dump::False->process + ]; + + my $expected = join( ", ", @expected ); + + ok( my $response = request('http://localhost/action/forward/six'), 'Request' ); + ok( $response->is_success, 'Response Successful 2xx' ); + is( $response->content_type, 'text/plain', 'Response Content-Type' ); + is( $response->header('X-Catalyst-Action'), 'action/forward/six', 'Main Class Action' ); + is( $response->header('X-Test-Class'), 'TestApp::Controller::Action::Forward', 'Test Class' ); + is( $response->header('X-Catalyst-Executed'), $expected, 'Executed actions' ); + like( $response->content, qr/^bless\( .* 'Catalyst::Request' \)$/s, 'Content is a serialized Catalyst::Request' ); +} + +{ + my @expected = qw[ + TestApp::Controller::Action::Forward->begin TestApp::Controller::Action::Forward->jojo TestApp::Controller::Action::Forward->one TestApp::Controller::Action::Forward->two