X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=test%2FT630-emacs-draft.sh;h=689ccfb83a721d2a1611d9ae1e5821a88b4f2521;hb=90248f862b1860cc80c8afd06636311372e95fe4;hp=e39690cadd16c4e971491c3100102a794dbce6bb;hpb=d820b97477f5705640aa8dcf9dcf311e37508def;p=notmuch diff --git a/test/T630-emacs-draft.sh b/test/T630-emacs-draft.sh index e39690ca..689ccfb8 100755 --- a/test/T630-emacs-draft.sh +++ b/test/T630-emacs-draft.sh @@ -39,4 +39,17 @@ header_count=$(notmuch show --format=raw subject:draft-test-0003 | grep -c ^X-No body_count=$(notmuch notmuch show --format=raw subject:draft-test-0003 | grep -c '^\<#secure') test_expect_equal "$header_count,$body_count" "1,0" +test_begin_subtest "Refusing to save an encrypted draft" +test_emacs '(notmuch-mua-mail) + (message-goto-subject) + (insert "draft-test-0004") + (mml-secure-message-sign-encrypt) + (let ((notmuch-draft-save-plaintext nil)) + (notmuch-draft-save)) + (test-output)' +count1=$(notmuch count tag:draft) +count2=$(notmuch count subject:draft-test-0004) + +test_expect_equal "$count1,$count2" "3,0" + test_done