[Catalyst-commits] r13499 -
Catalyst-Runtime/5.80/branches/psgi/t/aggregate
t0m at dev.catalyst.perl.org
t0m at dev.catalyst.perl.org
Mon Aug 16 19:05:44 GMT 2010
Author: t0m
Date: 2010-08-16 20:05:44 +0100 (Mon, 16 Aug 2010)
New Revision: 13499
Modified:
Catalyst-Runtime/5.80/branches/psgi/t/aggregate/live_engine_request_env.t
Log:
Remove that idiocy
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:57:26 UTC (rev 13498)
+++ Catalyst-Runtime/5.80/branches/psgi/t/aggregate/live_engine_request_env.t 2010-08-16 19:05:44 UTC (rev 13499)
@@ -13,29 +13,29 @@
BEGIN {
$EXPECTED_ENV_VAR = "CATALYSTTEST$$"; # has to be uppercase otherwise fails on Win32
- $EXPECTED_ENV_VAL = $ENV{$EXPECTED_ENV_VAR}
- = "Test env value " . rand(100000);
+ $EXPECTED_ENV_VAL = "Test env value " . rand(100000);
}
-use Test::More;
+use Test::More tests => 7;
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 $env;
+ my $response = request("http://localhost/dump/env", {
+ extra_env => { $EXPECTED_ENV_VAR => $EXPECTED_ENV_VAL },
+ });
- ok( my $response = request("http://localhost/dump/env"),
- 'Request' );
+ ok( $response, '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}), 'Have a PATH env var';
+ ok exists($env->{PATH_INFO}), 'Have a PATH_INFO env var';
SKIP:
{
@@ -47,5 +47,3 @@
}
}
-done_testing;
-
More information about the Catalyst-commits
mailing list