X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Fimport.t;h=d309eec52de1bb63cbc9739960f2bd7abd4e6718;hb=4821798351defce82c102e46d6f5f84f0cdc0e34;hp=e7733638f023fd4852963fe6d88b85da9f85e842;hpb=50c822076abee76c3133ffc3482488392eecedfb;p=public-inbox.git
diff --git a/t/import.t b/t/import.t
index e7733638..d309eec5 100644
--- a/t/import.t
+++ b/t/import.t
@@ -1,4 +1,4 @@
-# Copyright (C) 2016-2018 all contributors
+# Copyright (C) 2016-2019 all contributors
# License: AGPL-3.0+
use strict;
use warnings;
@@ -96,4 +96,12 @@ is(undef, $im->checkpoint, 'checkpoint works before ->done');
$im->done;
is(undef, $im->checkpoint, 'checkpoint works after ->done');
$im->checkpoint;
+
+my $nogit = PublicInbox::Git->new("$dir/non-existent/dir");
+eval {
+ my $nope = PublicInbox::Import->new($nogit, 'nope', 'no@example.com');
+ $nope->add($mime);
+};
+ok($@, 'Import->add fails on non-existent dir');
+
done_testing();