X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Fv2-add-remove-add.t;h=60a869eeb9d2462eeafdb21a431b96d27f5541ba;hb=e6b7a7f5f70fb89a54ff158bc6c8b564149947e5;hp=8be551234017f3c60a7375257ab4764fa4ee22ae;hpb=a09f678d8254064af7ca6dcfb3c3f84b5ae37b51;p=public-inbox.git
diff --git a/t/v2-add-remove-add.t b/t/v2-add-remove-add.t
index 8be55123..60a869ee 100644
--- a/t/v2-add-remove-add.t
+++ b/t/v2-add-remove-add.t
@@ -1,4 +1,4 @@
-# Copyright (C) 2018-2019 all contributors
+# Copyright (C) 2018-2020 all contributors
# License: AGPL-3.0+
use strict;
use warnings;
@@ -16,20 +16,19 @@ my $ibx = {
-primary_address => 'test@example.com',
};
$ibx = PublicInbox::Inbox->new($ibx);
-my $mime = PublicInbox::MIME->create(
- header => [
- From => 'a@example.com',
- To => 'test@example.com',
- Subject => 'this is a subject',
- Date => 'Fri, 02 Oct 1993 00:00:00 +0000',
- 'Message-ID' => '',
- ],
- body => "hello world\n",
-);
+my $mime = PublicInbox::MIME->new(<<'EOF');
+From: a@example.com
+To: test@example.com
+Subject: this is a subject
+Date: Fri, 02 Oct 1993 00:00:00 +0000
+Message-ID:
+
+hello world
+EOF
my $im = PublicInbox::V2Writable->new($ibx, 1);
$im->{parallel} = 0;
ok($im->add($mime), 'message added');
-ok($im->remove($mime), 'message added');
+ok($im->remove($mime), 'message removed');
ok($im->add($mime), 'message added again');
$im->done;
my $msgs = $ibx->recent({limit => 1000});