X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Fpsgi_search.t;h=64f8b1ac5c8378f6ce88a783f8bdcc86369efbd6;hb=0283273a14e1871955f6a9132f4f3f7884ec8a3f;hp=56b421189bf42c0b19391269607de1e68e98a0a4;hpb=3dff4a5399f10cbcb3d902da094680705c50193a;p=public-inbox.git diff --git a/t/psgi_search.t b/t/psgi_search.t index 56b42118..64f8b1ac 100644 --- a/t/psgi_search.t +++ b/t/psgi_search.t @@ -1,9 +1,9 @@ -# Copyright (C) 2017-2019 all contributors +# Copyright (C) 2017-2020 all contributors # License: AGPL-3.0+ use strict; use warnings; use Test::More; -use Email::MIME; +use PublicInbox::Eml; use PublicInbox::Config; use PublicInbox::Inbox; use PublicInbox::InboxWritable; @@ -27,7 +27,7 @@ my $im = $ibx->importer(0); my $digits = '10010260936330'; my $ua = 'Pine.LNX.4.10'; my $mid = "$ua.$digits.2460-100000\@penguin.transmeta.com"; -my $mime = PublicInbox::MIME->new(<new(< From: Ævar Arnfjörð Bjarmason @@ -36,7 +36,7 @@ To: git\@vger.kernel.org EOF $im->add($mime); -$mime = PublicInbox::MIME->new(<<'EOF'); +$mime = PublicInbox::Eml->new(<<'EOF'); Subject: Message-ID: From: blank subject @@ -45,7 +45,7 @@ To: git@vger.kernel.org EOF $im->add($mime); -$mime = PublicInbox::MIME->new(<<'EOF'); +$mime = PublicInbox::Eml->new(<<'EOF'); Message-ID: From: no subject at all To: git@vger.kernel.org @@ -107,6 +107,12 @@ test_psgi(sub { $www->call(@_) }, sub { 'subject-less message linked from "/$INBOX/?q=..."'); like($html, qr/\bhref="blank-subject[^>]+>\(no subject\)(GET('/test/no-subject-at-all@example.com/raw')); + like($res->header('Content-Disposition'), + qr/filename=no-subject\.txt/); + $res = $cb->(GET('/test/no-subject-at-all@example.com/t.mbox.gz')); + like($res->header('Content-Disposition'), + qr/filename=no-subject\.mbox\.gz/); }); done_testing();