From 459dd0062bfc3ff82ee10a01e7dbb34ae003ce21 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Fri, 7 Jan 2011 16:43:29 -0600 Subject: factor out scheme handling into separate backends docs still need updating --- t/01-basic.t | 5 +---- t/02-inputs.t | 5 ++++- t/03-delayed-response.t | 5 ++++- t/04-streaming.t | 5 ++++- 4 files changed, 13 insertions(+), 7 deletions(-) (limited to 't') diff --git a/t/01-basic.t b/t/01-basic.t index 0be56ac..6e185b4 100644 --- a/t/01-basic.t +++ b/t/01-basic.t @@ -35,11 +35,8 @@ test_tcp_plackup( ] }, }; - my $client = Plack::Client->new(apps => $apps); + my $client = Plack::Client->new('psgi-local' => {apps => $apps}); isa_ok($client, 'Plack::Client'); - is($client->apps, $apps, "got apps back"); - is($client->app_for('foo'), $apps->{foo}, "got the right app"); - is($client->app_for('bar'), undef, "didn't get nonexistent app"); { my $res = $client->get('psgi-local://foo/'); diff --git a/t/02-inputs.t b/t/02-inputs.t index 04d5312..09e471c 100644 --- a/t/02-inputs.t +++ b/t/02-inputs.t @@ -48,7 +48,10 @@ test_tcp_plackup( }; my $base_uri = 'psgi-local://foo'; - test_responses($base_uri, Plack::Client->new(apps => $apps)); + test_responses( + $base_uri, + Plack::Client->new('psgi-local' => {apps => $apps}) + ); } sub test_responses { diff --git a/t/03-delayed-response.t b/t/03-delayed-response.t index 9d9b258..26d9037 100644 --- a/t/03-delayed-response.t +++ b/t/03-delayed-response.t @@ -51,7 +51,10 @@ test_tcp_plackup( }; my $base_uri = 'psgi-local://foo'; - test_responses($base_uri, Plack::Client->new(apps => $apps)); + test_responses( + $base_uri, + Plack::Client->new('psgi-local' => {apps => $apps}) + ); } sub test_responses { diff --git a/t/04-streaming.t b/t/04-streaming.t index a494681..17a42e6 100644 --- a/t/04-streaming.t +++ b/t/04-streaming.t @@ -52,7 +52,10 @@ test_tcp_plackup( }; my $base_uri = 'psgi-local://foo'; - test_responses($base_uri, Plack::Client->new(apps => $apps)); + test_responses( + $base_uri, + Plack::Client->new('psgi-local' => {apps => $apps}) + ); } sub test_responses { -- cgit v1.2.3-54-g00ecf