3 # This tests to make sure the Authorization header is passed through by the engine.
9 use lib "$FindBin::Bin/lib";
11 use Test::More tests => 7;
12 use Catalyst::Test 'TestApp';
14 use Catalyst::Request;
16 use HTTP::Request::Common;
22 'http://localhost/dump/request',
23 'Authorization' => 'Basic dGVzdDoxMjM0NQ==',
26 ok( my $response = request($request), 'Request' );
27 ok( $response->is_success, 'Response Successful 2xx' );
28 is( $response->content_type, 'text/plain', 'Response Content-Type' );
29 like( $response->content, qr/'Catalyst::Request'/,
30 'Content is a serialized Catalyst::Request' );
35 eval '$creq = ' . $response->content,
36 'Unserialize Catalyst::Request'
40 isa_ok( $creq, 'Catalyst::Request' );
42 is( $creq->header('Authorization'), 'Basic dGVzdDoxMjM0NQ==', 'auth header ok' );