about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-05-25 11:01:36 +0000
committerEric Wong <e@80x24.org>2021-05-25 18:42:09 +0000
commitbfe6a3e13c286d60a5bfa46cef7625f83ae0ca18 (patch)
treea600016bf97e6364e1cb4990f11700d74a84c133 /t
parent172d2d126cb9c0fa78b41a01f285f9294cc78f15 (diff)
downloadpublic-inbox-bfe6a3e13c286d60a5bfa46cef7625f83ae0ca18.tar.gz
Sometimes a user stops caring to sync an IMAP or Maildir
folder, or wants to force a resync.  Let them run this
command to have lei forget all the sync information about
the mail folder.

This won't delete any stored messages in git, but will
leave "lei index" users with dangling references.
Diffstat (limited to 't')
-rw-r--r--t/lei-import-imap.t4
1 files changed, 4 insertions, 0 deletions
diff --git a/t/lei-import-imap.t b/t/lei-import-imap.t
index d3935c82..5283cc23 100644
--- a/t/lei-import-imap.t
+++ b/t/lei-import-imap.t
@@ -71,5 +71,9 @@ test_lei({ tmpdir => $tmpdir }, sub {
         like($lei_out, qr!^Content-Type: multipart/mixed;!sm, 'got full blob');
         lei_ok('blob', "$psgi_attach:2");
         is($lei_out, "b64\xde\xad\xbe\xef\n", 'got attachment');
+
+        lei_ok 'forget-mail-sync', $url;
+        lei_ok 'ls-mail-sync';
+        unlike($lei_out, qr!\Q$host_port\E!, 'sync info gone after forget');
 });
 done_testing;