diff options
author | Eric Wong <e@80x24.org> | 2019-01-04 08:51:20 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2019-01-04 08:51:20 +0000 |
commit | 6c02bc3c3035734bb458305a312d73df2d446c11 (patch) | |
tree | f0a9f9088d126c48df553682347d9ea16fac4518 | |
parent | 7daecda382e558c93304cccfa0285f66f35015ab (diff) | |
download | public-inbox-6c02bc3c3035734bb458305a312d73df2d446c11.tar.gz |
More of this test will be, we use PSGI nowadays; and most of these tests can be ported over to use PSGI and not fork+exec as much.
-rw-r--r-- | t/cgi.t | 24 |
1 files changed, 7 insertions, 17 deletions
@@ -48,9 +48,8 @@ my $im = PublicInbox::Import->new($git, 'test', $addr); { local $ENV{HOME} = $home; - # ensure successful message delivery - { - my $mime = Email::MIME->new(<<EOF); + # inject some messages: + my $mime = Email::MIME->new(<<EOF); From: Me <me\@example.com> To: You <you\@example.com> Cc: $addr @@ -60,15 +59,10 @@ Date: Thu, 01 Jan 1970 00:00:00 +0000 zzzzzz EOF - $im->add($mime); - $im->done; - my $rev = `git --git-dir=$maindir rev-list HEAD`; - like($rev, qr/\A[a-f0-9]{40}/, "good revision committed"); - } + $im->add($mime); # deliver a reply, too - { - my $reply = Email::MIME->new(<<EOF); + my $reply = Email::MIME->new(<<EOF); From: You <you\@example.com> To: Me <me\@example.com> Cc: $addr @@ -82,12 +76,8 @@ Me wrote: what? EOF - $im->add($reply); - $im->done; - my $rev = `git --git-dir=$maindir rev-list HEAD`; - like($rev, qr/\A[a-f0-9]{40}/, "good revision committed"); - } - + $im->add($reply); + $im->done; } # obvious failures, first @@ -118,7 +108,7 @@ EOF like($res->{head}, qr/Status:\s*206/i, "info/refs partial past end OK"); is($res->{body}, substr($orig, 5), 'partial body OK past end'); } -use Data::Dumper; + # atom feeds { local $ENV{HOME} = $home; |