From 15eb65ffd59c7cf5cce67c6b7621f63194fd1083 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 3 Apr 2018 10:34:54 +0000 Subject: mbox: do not barf on queries which return no results Having zero search results means we never get a chance to populate the Content-Disposition header for mbox downloads. --- t/psgi_search.t | 4 ++++ 1 file changed, 4 insertions(+) (limited to 't/psgi_search.t') diff --git a/t/psgi_search.t b/t/psgi_search.t index 84b3daa3..cf5a7e91 100644 --- a/t/psgi_search.t +++ b/t/psgi_search.t @@ -70,6 +70,10 @@ test_psgi(sub { $www->call(@_) }, sub { $res = $cb->(GET('/test/?q=s:test&l=5e')); is($res->code, 200, 'successful search result'); is_deeply([], $warn, 'no warnings from non-numeric comparison'); + + $res = $cb->(POST('/test/?q=s:bogus&x=m')); + is($res->code, 404, 'failed search result gives 404'); + is_deeply([], $warn, 'no warnings'); }); done_testing(); -- cgit v1.2.3-24-ge0c7