]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/cgi.t
import: init_bare: allow use as method, use in tests
[public-inbox.git] / t / cgi.t
diff --git a/t/cgi.t b/t/cgi.t
index 97bdebd982a191e5cd96ec83620f097af7f721ae..52f80e88e2fbd1545ed105b806eb6a5ec4fa72e1 100644 (file)
--- a/t/cgi.t
+++ b/t/cgi.t
@@ -7,6 +7,7 @@ use warnings;
 use Test::More;
 use Email::MIME;
 use PublicInbox::TestCommon;
+use PublicInbox::Import;
 require_mods(qw(Plack::Handler::CGI Plack::Util));
 my ($tmpdir, $for_destroy) = tmpdir();
 my $home = "$tmpdir/pi-home";
@@ -18,7 +19,7 @@ my $addr = 'test-public@example.com';
 {
        is(1, mkdir($home, 0755), "setup ~/ for testing");
        is(1, mkdir($pi_home, 0755), "setup ~/.public-inbox");
-       is(0, system(qw(git init -q --bare), $maindir), "git init (main)");
+       PublicInbox::Import::init_bare($maindir);
 
        open my $fh, '>', "$maindir/description" or die "open: $!\n";
        print $fh "test for public-inbox\n";