X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Faggregate%2Flive_engine_request_remote_user.t;h=1a6c0d8ab410ab4056469b095b9946be6c6cda30;hb=a943d722ed6e624a46cc687f4bd3ae2ff096963d;hp=10b071b999006bc40d97c19a47b69a451bcdefe7;hpb=8026359e6ff39e39df67381dcf52a15df78804cf;p=catagits%2FCatalyst-Runtime.git diff --git a/t/aggregate/live_engine_request_remote_user.t b/t/aggregate/live_engine_request_remote_user.t index 10b071b..1a6c0d8 100644 --- a/t/aggregate/live_engine_request_remote_user.t +++ b/t/aggregate/live_engine_request_remote_user.t @@ -17,12 +17,11 @@ use HTTP::Request::Common; { 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'/, @@ -33,10 +32,16 @@ use HTTP::Request::Common; ok( eval '$creq = ' . $response->content, 'Unserialize Catalyst::Request' - ); + ) + or fail("Failed to deserialize $@ from " . $response->content); } isa_ok( $creq, 'Catalyst::Request' ); - - is( $creq->remote_user, 'dwc', '$c->req->remote_user ok' ); + SKIP: + { + if ( $ENV{CATALYST_SERVER} ) { + skip 'Using remote server', 1; + } + is( $creq->remote_user, 'dwc', '$c->req->remote_user ok' ); + } }