X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Fhtml_index.t;h=f29b442d9f811b7b393322d5638f60a9c5c362b2;hb=956ede734d7c2e8d0a3003c6e2d554114586643e;hp=6896eb41b7ff5ae8f3bc48fb9472c32e22ca584a;hpb=fe3d2447badd595df784541556311137b920b0a2;p=public-inbox.git diff --git a/t/html_index.t b/t/html_index.t index 6896eb41..f29b442d 100644 --- a/t/html_index.t +++ b/t/html_index.t @@ -7,10 +7,17 @@ use Email::MIME; 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); my $git_dir = "$tmpdir/gittest"; -my $git = PublicInbox::Git->new($git_dir); +my $ibx = PublicInbox::Inbox->new({ + address => 'test@example', + name => 'tester', + mainrepo => $git_dir, + url => 'http://example.com/test', +}); +my $git = $ibx->git; my $im = PublicInbox::Import->new($git, 'tester', 'test@example'); # setup @@ -19,11 +26,6 @@ my $im = PublicInbox::Import->new($git, 'tester', 'test@example'); my $prev = ""; foreach my $i (1..6) { - # my $pid = open(my $pipe, "|-"); - # defined $pid or die "fork/pipe failed: $!\n"; - # if ($pid == 0) { - # exec("ssoma-mda", $git_dir); - # } my $mid = "<$i\@example.com>"; my $mid_line = "Message-ID: $mid"; if ($prev) { @@ -51,15 +53,4 @@ EOF $im->done; } -# check HTML index -{ - use IO::File; - my $cb = PublicInbox::Feed::generate_html_index({ - git_dir => $git_dir, - max => 3 - }); - require 't/common.perl'; - like(stream_to_string($cb), qr/html/, "feed is valid HTML :)"); -} - done_testing();