diff options
author | Eric Wong <e@80x24.org> | 2016-05-28 01:57:08 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-05-28 01:57:34 +0000 |
commit | 589199dcfebcb96ab77fff6043ecb142b948f824 (patch) | |
tree | 6e0c5622901ee5d7e4ae8b2b116d510d85bc98ff | |
parent | 0b1c6867ee10d9edcbd75c359cb23c75b732682e (diff) | |
download | public-inbox-589199dcfebcb96ab77fff6043ecb142b948f824.tar.gz |
We don't serve things like robots.txt, favicon.ico, or .well-known/ endpoints ourselves, but ensure we can be used with Plack::App::Cascade for others.
-rw-r--r-- | t/plack.t | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -62,16 +62,24 @@ EOF require $psgi; }; + test_psgi($app, sub { + my ($cb) = @_; + foreach my $u (qw(robots.txt favicon.ico .well-known/foo)) { + my $res = $cb->(GET("http://example.com/$u")); + is($res->code, 404, "$u is missing"); + } + }); + # redirect with newsgroup test_psgi($app, sub { my ($cb) = @_; my $from = 'http://example.com/inbox.test'; my $to = 'http://example.com/test/'; my $res = $cb->(GET($from)); - is($res->code, 301, 'is permanent redirect'); + is($res->code, 301, 'newsgroup name is permanent redirect'); is($to, $res->header('Location'), 'redirect location matches'); $from .= '/'; - is($res->code, 301, 'is permanent redirect'); + is($res->code, 301, 'newsgroup name/ is permanent redirect'); is($to, $res->header('Location'), 'redirect location matches'); }); |