de275743830da9eb8504eacc22f3a99b85e7418d
[catagits/Catalyst-Runtime.git] / t / 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::FullyQualified
18 ];
19
20 my $expected = join( ", ", @expected );
21
22 ok( my $response = request('http://localhost/dump/request'), 'Request' );
23 ok( $response->is_success, 'Response Successful 2xx' );
24 is( $response->content_type, 'text/plain', 'Response Content-Type' );
25 like( $response->content, qr/'Catalyst::Request'/,
26     'Content is a serialized Catalyst::Request' );
27 is( $response->header('X-Catalyst-Plugins'), $expected, 'Loaded plugins' );