106f6bccb85500a36c0d57338f85a11eb3f9d05e
[catagits/Catalyst-Runtime.git] / t / aggregate / live_plugin_loaded.t
1 use strict;
2 use warnings;
3
4 use FindBin;
5 use lib "$FindBin::Bin/../lib";
6
7 use Test::More tests => 5;
8 use Catalyst::Test 'TestApp';
9
10 my @expected = qw[
11   Catalyst::Plugin::Test::Errors
12   Catalyst::Plugin::Test::Headers
13   Catalyst::Plugin::Test::Inline
14   Catalyst::Plugin::Test::MangleDollarUnderScore
15   Catalyst::Plugin::Test::Plugin
16   Catalyst::Plugin::Unicode::Encoding
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' );