Create branch register_actions.
[catagits/Catalyst-Runtime.git] / t / aggregate / live_plugin_loaded.t
1 #!perl
2
3 use strict;
4 use warnings;
5
6 use FindBin;
7 use lib "$FindBin::Bin/../lib";
8
9 use Test::More tests => 5;
10 use Catalyst::Test 'TestApp';
11
12 my @expected = qw[
13   Catalyst::Plugin::Test::Errors
14   Catalyst::Plugin::Test::Headers
15   Catalyst::Plugin::Test::Inline
16   Catalyst::Plugin::Test::Plugin
17   TestApp::Plugin::AddDispatchTypes
18   TestApp::Plugin::FullyQualified
19 ];
20
21 my $expected = join( ", ", @expected );
22
23 ok( my $response = request('http://localhost/dump/request'), 'Request' );
24 ok( $response->is_success, 'Response Successful 2xx' );
25 is( $response->content_type, 'text/plain', 'Response Content-Type' );
26 like( $response->content, qr/'Catalyst::Request'/,
27     'Content is a serialized Catalyst::Request' );
28 is( $response->header('X-Catalyst-Plugins'), $expected, 'Loaded plugins' );