aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2017-12-08 01:23:54 -0500
committerDavid Bremner <david@tethera.net>2017-12-08 08:08:46 -0400
commit6802b333eb356fdeafd97a4e4ed74999d055a852 (patch)
treef3cf6778668a27006ff63edde8f5e70c6d813cef /test
parente4890b5bf9e2260b36bcc36ddb77d8e97e2abe7d (diff)
cli/reply: use decryption policy "auto" by default.
If the user doesn't specify --decrypt= at all, but a stashed session key is known to notmuch, when replying to an encrypted message, notmuch should just go ahead and decrypt. The user can disable this at the command line with --decrypt=false, though it's not clear why they would ever want to do that.
Diffstat (limited to 'test')
-rwxr-xr-xtest/T357-index-decryption.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/T357-index-decryption.sh b/test/T357-index-decryption.sh
index 7996ec67..31991e22 100755
--- a/test/T357-index-decryption.sh
+++ b/test/T357-index-decryption.sh
@@ -200,6 +200,16 @@ test_expect_equal \
"$output" \
"$expected"
+test_begin_subtest "notmuch reply should show cleartext if session key is present"
+output=$(notmuch reply id:simple-encrypted@crypto.notmuchmail.org | grep '^>')
+expected='> This is a top sekrit message.'
+if [ $NOTMUCH_HAVE_GMIME_SESSION_KEYS -eq 0 ]; then
+ test_subtest_known_broken
+fi
+test_expect_equal \
+ "$output" \
+ "$expected"
+
# TODO: test removal of a message from the message store between
# indexing and reindexing.