Added recursive -r flag to prove example
[catagits/Catalyst-Runtime.git] / t / plugin / loaded.t
CommitLineData
dd4e6fd2 1#!perl
2
3use strict;
4use warnings;
5
6use FindBin;
8ba781cd 7use lib "$FindBin::Bin/../lib";
dd4e6fd2 8
c20bd9d9 9use Test::More tests => 5;
dd4e6fd2 10use 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}