]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/v1-add-remove-add.t
t/nntpd: reduce dependencies on internal API
[public-inbox.git] / t / v1-add-remove-add.t
index 2867bb9414c19f76ca4d9d8eacffcc50b8708ae7..fdf06a96e764dc98c828dc4aef33da0de0a75ea7 100644 (file)
@@ -9,7 +9,6 @@ use PublicInbox::TestCommon;
 require_mods(qw(DBD::SQLite Search::Xapian));
 require PublicInbox::SearchIdx;
 my ($inboxdir, $for_destroy) = tmpdir();
-is(system(qw(git init --bare -q), $inboxdir), 0);
 my $ibx = {
        inboxdir => $inboxdir,
        name => 'test-add-remove-add',
@@ -27,8 +26,9 @@ my $mime = PublicInbox::MIME->create(
        body => "hello world\n",
 );
 my $im = PublicInbox::Import->new($ibx->git, undef, undef, $ibx);
+$im->init_bare;
 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 $rw = PublicInbox::SearchIdx->new($ibx, 1);