1 # This tests to make sure the Authorization header is passed through by the engine.
7 use lib "$FindBin::Bin/../lib";
9 use Test::More tests => 7;
10 use Catalyst::Test 'TestApp';
12 use Catalyst::Request;
14 use HTTP::Request::Common;
20 'http://localhost/dump/request',
21 'Authorization' => 'Basic dGVzdDoxMjM0NQ==',
24 ok( my $response = request($request), 'Request' );
25 ok( $response->is_success, 'Response Successful 2xx' );
26 is( $response->content_type, 'text/plain', 'Response Content-Type' );
27 like( $response->content, qr/'Catalyst::Request'/,
28 'Content is a serialized Catalyst::Request' );
33 eval '$creq = ' . $response->content,
34 'Unserialize Catalyst::Request'
38 isa_ok( $creq, 'Catalyst::Request' );
40 is( $creq->header('Authorization'), 'Basic dGVzdDoxMjM0NQ==', 'auth header ok' );