From 5cd0eab98e088720e6090e8533b1fb8e52a8a214 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Thu, 6 Jan 2011 12:53:46 -0600 Subject: handle env hashes too this is getting uglier and uglier - need to rethink this i think --- t/02-inputs.t | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 't') diff --git a/t/02-inputs.t b/t/02-inputs.t index 1489175..4b27630 100644 --- a/t/02-inputs.t +++ b/t/02-inputs.t @@ -125,14 +125,18 @@ sub test_responses { "GET\n/\n\n" ); - { local $TODO = "actually, i have no idea if this even makes sense"; + my $uri = URI->new($base_uri); + $uri->scheme('http') + if $base_uri =~ /psgi-local/; + my $env = HTTP::Request->new(GET => $uri)->to_psgi; + $env->{'psgi.url_scheme'} = 'psgi-local' + if $base_uri =~ /psgi-local/; response_is( - $client->request(HTTP::Request->new(GET => $base_uri)), + $client->request($env), 200, ['Content-Type' => 'text/plain', 'Content-Length' => '7'], "GET\n/\n\n" ); - } } done_testing; -- cgit v1.2.3-54-g00ecf