test: add test for sending pgp/mime as plaintext
This commit is contained in:
@ -254,6 +254,20 @@ func TestPreferencesBuilder(t *testing.T) {
|
|||||||
wantMIMEType: "multipart/mixed",
|
wantMIMEType: "multipart/mixed",
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
name: "external with sign enabled, sending plaintext, should still send as ClearMIME",
|
||||||
|
|
||||||
|
contactMeta: &ContactMetadata{Sign: true, SignIsSet: true},
|
||||||
|
receivedKeys: []pmapi.PublicKey{},
|
||||||
|
isInternal: false,
|
||||||
|
mailSettings: pmapi.MailSettings{PGPScheme: pmapi.PGPMIMEPackage, DraftMIMEType: "text/plain"},
|
||||||
|
|
||||||
|
wantEncrypt: false,
|
||||||
|
wantSign: true,
|
||||||
|
wantScheme: pmapi.ClearMIMEPackage,
|
||||||
|
wantMIMEType: "multipart/mixed",
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: "external with pinned contact public key but no intention to encrypt/sign",
|
name: "external with pinned contact public key but no intention to encrypt/sign",
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user