use inlined module hiding in tests
[catagits/Catalyst-Runtime.git] / t / aggregate / live_component_controller_anon.t
1 use strict;
2 use warnings;
3
4 use FindBin;
5 use lib "$FindBin::Bin/../lib";
6
7 use Test::More tests => 6;
8 use 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 catalyst_component_name');
15     isnt($response->header('X-Component-Instance-Name-Action'),
16         'TestApp::Controller::Anon', 'ref($controller) ne catalyst_component_name');
17     is($response->header('X-Component-Name-Controller'),
18         'TestApp::Controller::Anon', 'Controller can see correct catalyst_component_name');
19     is($response->header('X-Class-In-Action'),
20         'TestApp::Controller::Anon', '$action->class is catalyst_component_name');
21     is($response->header('X-Anon-Trait-Applied'),
22         '1', 'Anon controller class has trait applied correctly');
23 }
24