]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/psgi_v2.t
www_coderepo: /tree/ redirects to /$OID/s/
[public-inbox.git] / t / psgi_v2.t
index 7d73b606dbef5f0ad736cc57ddaef5b5d222e4b8..f709c3c7a04ba8ef06eb20b6df4e8d0ce50bc98e 100644 (file)
@@ -1,5 +1,5 @@
 #!perl -w
-# Copyright (C) 2018-2021 all contributors <meta@public-inbox.org>
+# Copyright (C) all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 use strict;
 use v5.10.1;
@@ -209,6 +209,8 @@ my $client1 = sub {
        local $SIG{__WARN__} = 'DEFAULT';
        $res = $cb->(GET('/v2test/a-mid@b/'));
        $raw = $res->content;
+       like($raw, qr/WARNING: multiple messages have this Message-ID/,
+               'warned about duplicate Message-IDs');
        like($raw, qr/^hello world$/m, 'got first message');
        like($raw, qr/^hello world!$/m, 'got second message');
        like($raw, qr/^hello ghosts$/m, 'got third message');
@@ -218,6 +220,9 @@ my $client1 = sub {
                like($raw, qr!>\Q$mid\E</a>!s, "Message-ID $mid shown");
        }
        like($raw, qr/\b3\+ messages\b/, 'thread overview shown');
+
+       $res = $cb->(GET('/v2test/a-mid@b/d/'));
+       is($res->code, 200, '/d/ (diff) endpoint works');
 };
 
 test_psgi(sub { $www->call(@_) }, $client1);