]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/cgi.t
www: redirect /$MESSAGE_ID/f/ endpoints
[public-inbox.git] / t / cgi.t
diff --git a/t/cgi.t b/t/cgi.t
index f1a2730c6d799d27bd476d4467f2773d7c6818b4..d7e3ac5b0173a886773abf8674dc39d0f457f8ec 100644 (file)
--- a/t/cgi.t
+++ b/t/cgi.t
@@ -188,9 +188,11 @@ EOF
        like($res->{head}, qr/Status: 300 Multiple Choices/, "mid html miss");
 
        $res = cgi_run("/test/blahblah\@example.com/f/");
-       like($res->{body}, qr/\A<html>/, "mid html");
-       like($res->{head}, qr/Status: 200 OK/, "200 response");
-       $res = cgi_run("/test/blahblah\@example.con/f/");
+       like($res->{head}, qr/Status: 301 Moved/, "301 response");
+       like($res->{head},
+               qr!^Location: http://[^/]+/test/blahblah%40example\.com/\r\n!ms,
+               '301 redirect location');
+       $res = cgi_run("/test/blahblah\@example.con/");
        like($res->{head}, qr/Status: 300 Multiple Choices/, "mid html miss");
 
        $res = cgi_run("/test/");