Changelog for r11037
[catagits/Catalyst-Runtime.git] / t / aggregate / live_component_controller_anon.t
CommitLineData
5bb1a415 1use strict;
2use warnings;
3
4use FindBin;
5use lib "$FindBin::Bin/../lib";
6
7use Test::More tests => 6;
8use Catalyst::Test 'TestApp';
9
10{
11 my $response = request('http://localhost/anon/test');
12 ok($response->is_success);
13 is($response->header('X-Component-Name-Action'),
14 'TestApp::Controller::Anon', 'Action can see correct _component_name');
15 isnt($response->header('X-Component-Instance-Name-Action'),
16 'TestApp::Controller::Anon', 'ref($controller) ne _component_name');
17 is($response->header('X-Component-Name-Controller'),
18 'TestApp::Controller::Anon', 'Controller can see correct _component_name');
19 is($response->header('X-Class-In-Action'),
20 'TestApp::Controller::Anon', '$action->class is _component_name');
21 is($response->header('X-Anon-Trait-Applied'),
22 '1', 'Anon controller class has trait applied correctly');
23}
24