summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2011-01-06 14:53:31 -0600
committerJesse Luehrs <doy@tozt.net>2011-01-06 14:53:31 -0600
commit542ade65e7d6327770fece393b451c20e3ac2049 (patch)
tree2b5ecfcc7fd1433fecd6a1c503c78c095239f1d6
parentc26ad92c18e6a88321925a26fcedd7325c5e1277 (diff)
downloadplack-client-542ade65e7d6327770fece393b451c20e3ac2049.tar.gz
plack-client-542ade65e7d6327770fece393b451c20e3ac2049.zip
one more test
-rw-r--r--t/02-inputs.t17
1 files changed, 17 insertions, 0 deletions
diff --git a/t/02-inputs.t b/t/02-inputs.t
index f46cb24..1865c61 100644
--- a/t/02-inputs.t
+++ b/t/02-inputs.t
@@ -141,6 +141,23 @@ sub test_responses {
"GET\n/\n\n"
);
}
+
+ {
+ my $base = URI->new($base_uri);
+ my $uri = $base->clone;
+ $uri->scheme('http');
+ $uri->path('/') unless $uri->path; # XXX: work around plack bug
+ my $env = HTTP::Request->new(GET => $uri)->to_psgi;
+ $env->{'plack.client.url_scheme'} = $base->scheme;
+ $env->{'plack.client.app_name'} = $base->authority
+ if $base->scheme eq 'psgi-local';
+ response_is(
+ $client->request(Plack::Request->new($env)),
+ 200,
+ ['Content-Type' => 'text/plain', 'Content-Length' => '7'],
+ "GET\n/\n\n"
+ );
+ }
}
done_testing;