]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/psgi_v2.t
t/psgi_v2: ignore warnings on missing P::M::ReverseProxy
[public-inbox.git] / t / psgi_v2.t
index 4ab9601c0f91985dfcd20f6876dd13ce17910dc1..c13f5e71b18419300594c481720a2381b3d0dbf3 100644 (file)
@@ -40,7 +40,11 @@ my $run_httpd = sub {
                Plack::Test::ExternalServer::test_psgi(client => $client);
                $td->join('TERM');
                open my $fh, '<', $err or BAIL_OUT $!;
-               is(do { local $/; <$fh> }, '', 'no errors');
+               my $e = do { local $/; <$fh> };
+               if ($e =~ s/^Plack::Middleware::ReverseProxy missing,\n//gms) {
+                       $e =~ s/^URL generation for redirects .*\n//gms;
+               }
+               is($e, '', 'no errors');
        }
 };
 
@@ -296,6 +300,9 @@ my $client3 = sub {
        }
        $res = $cb->(GET('/v2test/?t=1970'.'01'.'01'.'000000'));
        is($res->code, 404, '404 for out-of-range t= param');
+       @warn = ();
+       $res = $cb->(GET('/v2test/?t=1970'.'01'.'01'));
+       is_deeply(\@warn, [], 'no warnings on YYYYMMDD only');
 };
 test_psgi(sub { $www->call(@_) }, $client3);
 $run_httpd->($client3, 4);