-#!perl
-
# This tests to make sure the REMOTE_USER environment variable is properly passed through by the engine.
use strict;
{
my $creq;
- local $ENV{REMOTE_USER} = 'dwc';
my $request = GET(
'http://localhost/dump/request',
);
- ok( my $response = request($request), 'Request' );
+ ok( my $response = request($request, { extra_env => { REMOTE_USER => 'dwc' } }), 'Request' );
ok( $response->is_success, 'Response Successful 2xx' );
is( $response->content_type, 'text/plain', 'Response Content-Type' );
like( $response->content, qr/'Catalyst::Request'/,
ok(
eval '$creq = ' . $response->content,
'Unserialize Catalyst::Request'
- );
+ )
+ or fail("Failed to deserialize $@ from " . $response->content);
}
isa_ok( $creq, 'Catalyst::Request' );