diff options
author | Eric Wong <e@80x24.org> | 2019-01-04 11:32:00 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2019-01-04 11:32:00 +0000 |
commit | 8c00f5572466200df6112b0f8401005e9377e5f8 (patch) | |
tree | 2fed623fac85dd97e2b5ee914424f0c4367148f5 | |
parent | bfcbbb30ef2001d18219079a7379eb9c99d16cdc (diff) | |
download | public-inbox-8c00f5572466200df6112b0f8401005e9377e5f8.tar.gz |
No point in implementing these slowly with the CGI wrapper when PSGI is sufficient for testing.
-rw-r--r-- | t/cgi.t | 10 | ||||
-rw-r--r-- | t/plack.t | 13 |
2 files changed, 13 insertions, 10 deletions
@@ -80,16 +80,6 @@ EOF $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; @@ -240,6 +240,19 @@ EOF 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(); |