about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-02-06 23:22:56 +0000
committerEric Wong <e@80x24.org>2019-02-07 21:38:34 +0000
commit1a958ac483da8edf45d077b57537b64341f75d7b (patch)
tree0a89e7a54c53d7f608bfbefd25997b77d5e4c3b8 /t
parent66f3f784a864a752c40b9aecf120aefdfc31e5c8 (diff)
downloadpublic-inbox-1a958ac483da8edf45d077b57537b64341f75d7b.tar.gz
WwwStream started depending on the WWW::style method
for configurable CSS, so mock ::style so the benchmark
runs properly.

Fixes: f026dbdd392c9dd5 ('www: admin-configurable CSS via "publicinbox.css"')
Diffstat (limited to 't')
-rw-r--r--t/perf-msgview.t2
1 files changed, 2 insertions, 0 deletions
diff --git a/t/perf-msgview.t b/t/perf-msgview.t
index 4975305a..0defafc4 100644
--- a/t/perf-msgview.t
+++ b/t/perf-msgview.t
@@ -19,6 +19,7 @@ if (require_git(2.19, 1)) {
 "git <2.19, cat-file lacks --unordered, locality suffers\n";
 }
 
+use_ok 'Plack::Util';
 my $ibx = PublicInbox::Inbox->new({ mainrepo => $pi_dir, name => 'name' });
 my $git = $ibx->git;
 my $fh = $git->popen(@cat);
@@ -29,6 +30,7 @@ select($vec, undef, undef, 60) or die "timed out waiting for --batch-check";
 my $ctx = {
         env => { HTTP_HOST => 'example.com', 'psgi.url_scheme' => 'https' },
         -inbox => $ibx,
+        www => Plack::Util::inline_object(style => sub {''}),
 };
 my ($str, $mime, $res, $cmt, $type);
 my $n = 0;