]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/psgi_search.t
searchview: fix non-numeric comparison
[public-inbox.git] / t / psgi_search.t
index cc9c9cf42f2b714cbcbf57c0f5e856b9aa1cf331..84b3daa3402ac071b4562addc70ef3e6e547e71d 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2017 all contributors <meta@public-inbox.org>
+# Copyright (C) 2017-2018 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 use strict;
 use warnings;
@@ -64,6 +64,12 @@ test_psgi(sub { $www->call(@_) }, sub {
        is('%C3%86var', (keys %uniq)[0], 'matches original query');
        ok(index($html, 'by &#198;var Arnfj&#246;r&#240; 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');
 });
 
 done_testing();