X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Fpsgi_mount.t;h=8cac3502310c75a78930bdb910e2286f39faed14;hb=2fc67a18b7ccd75ea6eb945f18203cbf4bcf228f;hp=751c13b715a0c8616a79e7e5b0ef58eac3da8497;hpb=a09f678d8254064af7ca6dcfb3c3f84b5ae37b51;p=public-inbox.git
diff --git a/t/psgi_mount.t b/t/psgi_mount.t
index 751c13b7..8cac3502 100644
--- a/t/psgi_mount.t
+++ b/t/psgi_mount.t
@@ -1,4 +1,4 @@
-# Copyright (C) 2016-2019 all contributors
+# Copyright (C) 2016-2020 all contributors
# License: AGPL-3.0+
use strict;
use warnings;
@@ -9,15 +9,14 @@ my ($tmpdir, $for_destroy) = tmpdir();
my $maindir = "$tmpdir/main.git";
my $addr = 'test-public@example.com';
my $cfgpfx = "publicinbox.test";
-my @mods = qw(HTTP::Request::Common Plack::Test URI::Escape);
+my @mods = qw(HTTP::Request::Common Plack::Test URI::Escape
+ Plack::Builder Plack::App::URLMap);
require_mods(@mods);
use_ok $_ foreach @mods;
+use_ok 'PublicInbox::WWW';
use PublicInbox::Import;
use PublicInbox::Git;
use PublicInbox::Config;
-use PublicInbox::WWW;
-use Plack::Builder;
-use Plack::App::URLMap;
my $config = PublicInbox::Config->new(\<new($config);
-my $app = builder {
- enable 'Head';
- mount '/a' => builder { sub { $www->call(@_) } };
- mount '/b' => builder { sub { $www->call(@_) } };
-};
+my $app = builder(sub {
+ enable('Head');
+ mount('/a' => builder(sub { sub { $www->call(@_) } }));
+ mount('/b' => builder(sub { sub { $www->call(@_) } }));
+});
test_psgi($app, sub {
my ($cb) = @_;