2c3a07d32e625f50413a4a25565e572f5c59a9b6
[catagits/Catalyst-Runtime.git] / t / 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
13 {
14     my @expected = qw[
15         Catalyst::Plugin::Test::Errors
16         Catalyst::Plugin::Test::Headers
17     ];
18
19     my $expected = join( ", ", @expected );
20
21     ok( my $response = request('http://localhost/dump/request'), 'Request' );
22     ok( $response->is_success, 'Response Successful 2xx' );
23     is( $response->content_type, 'text/plain', 'Response Content-Type' );
24     like( $response->content, qr/^bless\( .* 'Catalyst::Request' \)$/s, 'Content is a serialized Catalyst::Request' );
25     is( $response->header('X-Catalyst-Plugins'), $expected, 'Loaded plugins' );
26 }