X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Fhtml_index.t;h=80f81577e2aee2d875a772678e26b665bc8ae877;hb=refs%2Ftags%2Fv1.6.1;hp=d31b68c0def3a34f20c5b68cf356f11f4d3b8b60;hpb=3d41aa23f35501ca92aab8aa42980fa73f7fa74f;p=public-inbox.git diff --git a/t/html_index.t b/t/html_index.t index d31b68c0..80f81577 100644 --- a/t/html_index.t +++ b/t/html_index.t @@ -1,20 +1,20 @@ -# Copyright (C) 2014-2018 all contributors +# Copyright (C) 2014-2020 all contributors # License: AGPL-3.0+ use strict; use warnings; use Test::More; -use Email::MIME; +use PublicInbox::Eml; use PublicInbox::Feed; use PublicInbox::Git; use PublicInbox::Import; use PublicInbox::Inbox; -use File::Temp qw/tempdir/; -my $tmpdir = tempdir('pi-http-XXXXXX', TMPDIR => 1, CLEANUP => 1); +use PublicInbox::TestCommon; +my ($tmpdir, $for_destroy) = tmpdir(); my $git_dir = "$tmpdir/gittest"; my $ibx = PublicInbox::Inbox->new({ address => 'test@example', name => 'tester', - mainrepo => $git_dir, + inboxdir => $git_dir, url => 'http://example.com/test', }); my $git = $ibx->git; @@ -22,7 +22,7 @@ my $im = PublicInbox::Import->new($git, 'tester', 'test@example'); # setup { - is(0, system(qw(git init -q --bare), $git_dir), "git init"); + $im->init_bare; my $prev = ""; foreach my $i (1..6) { @@ -32,7 +32,7 @@ my $im = PublicInbox::Import->new($git, 'tester', 'test@example'); $mid_line .= "In-Reply-To: $prev"; } $prev = $mid; - my $mime = Email::MIME->new(<new(< To: U $mid_line