[Catalyst-commits] r13498 -
Catalyst-Runtime/5.80/branches/psgi/t/aggregate
t0m at dev.catalyst.perl.org
t0m at dev.catalyst.perl.org
Mon Aug 16 18:57:26 GMT 2010
Author: t0m
Date: 2010-08-16 19:57:26 +0100 (Mon, 16 Aug 2010)
New Revision: 13498
Modified:
Catalyst-Runtime/5.80/branches/psgi/t/aggregate/live_engine_request_env.t
Log:
Fix test when live
Modified: Catalyst-Runtime/5.80/branches/psgi/t/aggregate/live_engine_request_env.t
===================================================================
--- Catalyst-Runtime/5.80/branches/psgi/t/aggregate/live_engine_request_env.t 2010-08-16 18:56:56 UTC (rev 13497)
+++ Catalyst-Runtime/5.80/branches/psgi/t/aggregate/live_engine_request_env.t 2010-08-16 18:57:26 UTC (rev 13498)
@@ -13,29 +13,29 @@
BEGIN {
$EXPECTED_ENV_VAR = "CATALYSTTEST$$"; # has to be uppercase otherwise fails on Win32
- $EXPECTED_ENV_VAL = "Test env value " . rand(100000);
+ $EXPECTED_ENV_VAL = $ENV{$EXPECTED_ENV_VAR}
+ = "Test env value " . rand(100000);
}
-use Test::More tests => 7;
+use Test::More;
use Catalyst::Test 'TestApp';
use Catalyst::Request;
use HTTP::Headers;
use HTTP::Request::Common;
+plan skip_all => 'Does not work in live tests' if ( $ENV{CATALYST_SERVER} );
+
{
- my $response = request("http://localhost/dump/env", {
- extra_env => { $EXPECTED_ENV_VAR => $EXPECTED_ENV_VAL },
- });
+ my $env;
- ok( $response, 'Request' );
+ ok( my $response = request("http://localhost/dump/env"),
+ 'Request' );
ok( $response->is_success, 'Response Successful 2xx' );
is( $response->content_type, 'text/plain', 'Response Content-Type' );
-
- my $env;
ok( eval '$env = ' . $response->content, 'Unserialize Catalyst::Request' );
is ref($env), 'HASH';
- ok exists($env->{PATH_INFO}), 'Have a PATH_INFO env var';
+ ok exists($env->{PATH}), 'Have a PATH env var';
SKIP:
{
@@ -47,3 +47,5 @@
}
}
+done_testing;
+
More information about the Catalyst-commits
mailing list