X-Git-Url: http://www.git.stargrave.org/?p=public-inbox.git;a=blobdiff_plain;f=t%2Fpsgi_search.t;h=2f033016ef8272d0699e2628ac212553a52822c3;hp=60a44bdecbcbccdd4a11eb148e0c3936ec7ae9cb;hb=cfb8d16578e7f2f2e300f9f436205e4a8fc7f322;hpb=1dc0f0c10fd856166a6726034de8aec53392901a diff --git a/t/psgi_search.t b/t/psgi_search.t index 60a44bde..2f033016 100644 --- a/t/psgi_search.t +++ b/t/psgi_search.t @@ -62,6 +62,16 @@ test_psgi(sub { $www->call(@_) }, sub { is('%C3%86var', (keys %uniq)[0], 'matches original query'); ok(index($html, 'by Ævar Arnfjörð Bjarmason') >= 0, "displayed Ævar's name properly in HTML"); + + my $warn = []; + local $SIG{__WARN__} = sub { push @$warn, @_ }; + $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();