]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/v2writable.t
inboxwritable: add assert_usable_dir sub
[public-inbox.git] / t / v2writable.t
index c2daac2f8484b4feb72ea752948af6cf9ac2cd2f..06dafe98e1ed65fdbd2fd7337ecc6c5bd34f25de 100644 (file)
@@ -260,4 +260,16 @@ EOF
        $im->done;
 }
 
+my $tmp = {
+       inboxdir => "$inboxdir/non-existent/subdir",
+       name => 'nope',
+       version => 2,
+       -primary_address => 'test@example.com',
+};
+eval {
+       my $nope = PublicInbox::V2Writable->new($tmp);
+       $nope->add($mime);
+};
+ok($@, 'V2Writable fails on non-existent dir');
+
 done_testing();