]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/psgi_v2.t
treewide: run update-copyrights from gnulib for 2019
[public-inbox.git] / t / psgi_v2.t
index 8c619cee08189ef00da350cfcf43ab2382268e7f..fc825acf621936c13b323e673d069fc268bf21dd 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2018-2019 all contributors <meta@public-inbox.org>
+# Copyright (C) 2018-2020 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 use strict;
 use warnings;
@@ -7,11 +7,11 @@ use PublicInbox::TestCommon;
 require_git(2.6);
 use PublicInbox::MIME;
 use PublicInbox::Config;
-use PublicInbox::WWW;
 use PublicInbox::MID qw(mids);
 require_mods(qw(DBD::SQLite Search::Xapian HTTP::Request::Common Plack::Test
                URI::Escape Plack::Builder));
 use_ok($_) for (qw(HTTP::Request::Common Plack::Test));
+use_ok 'PublicInbox::WWW';
 use_ok 'PublicInbox::V2Writable';
 my ($inboxdir, $for_destroy) = tmpdir();
 my $ibx = {
@@ -58,6 +58,9 @@ my $www = PublicInbox::WWW->new($config);
 my ($res, $raw, @from_);
 test_psgi(sub { $www->call(@_) }, sub {
        my ($cb) = @_;
+       $res = $cb->(GET('/v2test/description'));
+       like($res->content, qr!\$INBOX_DIR/description missing!,
+               'got v2 description missing message');
        $res = $cb->(GET('/v2test/a-mid@b/raw'));
        $raw = $res->content;
        like($raw, qr/^hello world$/m, 'got first message');