-my $ibx = PublicInbox::Inbox->new({
- inboxdir => $inboxdir,
- name => 'test-v2edit',
- version => 2,
- -primary_address => 'test@example.com',
- indexlevel => 'basic',
-});
-$ibx = PublicInbox::InboxWritable->new($ibx, {nproc=>1});
+my $file = 't/data/0001.patch';
+my $eml = eml_load($file);
+my $mid = mid_clean($eml->header('Message-ID'));
+my $ibx = create_inbox 'v2edit', indexlevel => 'basic', version => 2,
+ tmpdir => $inboxdir, sub {
+ my ($im, $ibx) = @_;
+ $im->add($eml) or BAIL_OUT;
+};