t/cgi.t | 10 ---------- t/plack.t | 13 +++++++++++++ diff --git a/t/cgi.t b/t/cgi.t index a25d2eeb26bc7f7078d721233b83636da8c33c8c..e705cd76a77b0203aa4ecfccaa529047adb209c3 100644 --- a/t/cgi.t +++ b/t/cgi.t @@ -80,16 +80,6 @@ $im->add($reply); $im->done; } -# obvious failures, first -{ - local $ENV{HOME} = $home; - my $res = cgi_run("/", "", "PUT"); - like($res->{head}, qr/Status:\s*405/i, "PUT not allowed"); - - $res = cgi_run("/"); - like($res->{head}, qr/Status:\s*404/i, "index returns 404"); -} - # message-id pages { local $ENV{HOME} = $home; diff --git a/t/plack.t b/t/plack.t index 14c9b657f50cb5db1d3758ab693b89cfc533b484..9901186b7905501216d432aa68dc065ee9b835c4 100644 --- a/t/plack.t +++ b/t/plack.t @@ -240,6 +240,19 @@ $res = $cb->($req); is(206, $res->code, 'got partial another response'); is($res->content, substr($orig, 5), 'partial body OK past end'); }); + + # things which should fail + test_psgi($app, sub { + my ($cb) = @_; + + my $res = $cb->(PUT('/')); + is(405, $res->code, 'no PUT to / allowed'); + $res = $cb->(PUT('/test/')); + is(405, $res->code, 'no PUT /$INBOX allowed'); + + # TODO + # $res = $cb->(GET('/')); + }); } done_testing();