GODT-213: correctly expect text/plain in custom message text parts

This commit is contained in:
James Houlahan
2021-04-12 10:19:39 +02:00
parent aa55c69307
commit 4850681f1d

View File

@ -1001,8 +1001,9 @@ func TestBuildCustomMessageHTML(t *testing.T) {
section(t, res). section(t, res).
expectContentType(is(`multipart/mixed`)) expectContentType(is(`multipart/mixed`))
// Even if it is HTML, we don't care... we abuse pgp/inline here.
section(t, res, 1). section(t, res, 1).
expectContentType(is(`text/html`)). expectContentType(is(`text/plain`)).
expectBody(contains(`This message could not be decrypted`)). expectBody(contains(`This message could not be decrypted`)).
expectBody(decryptsTo(foreignKR, `<html><body>body</body></html>`)). expectBody(decryptsTo(foreignKR, `<html><body>body</body></html>`)).
expectTransferEncoding(isMissing()) expectTransferEncoding(isMissing())
@ -1075,8 +1076,9 @@ func TestBuildCustomMessageHTMLWithAttachment(t *testing.T) {
section(t, res). section(t, res).
expectContentType(is(`multipart/mixed`)) expectContentType(is(`multipart/mixed`))
// Even if it is HTML, we don't care... we abuse pgp/inline here.
section(t, res, 1). section(t, res, 1).
expectContentType(is(`text/html`)). expectContentType(is(`text/plain`)).
expectBody(contains(`This message could not be decrypted`)). expectBody(contains(`This message could not be decrypted`)).
expectBody(decryptsTo(foreignKR, `<html><body>body</body></html>`)). expectBody(decryptsTo(foreignKR, `<html><body>body</body></html>`)).
expectTransferEncoding(isMissing()) expectTransferEncoding(isMissing())
@ -1118,8 +1120,9 @@ func TestBuildCustomMessageOnlyBodyIsUndecryptable(t *testing.T) {
section(t, res). section(t, res).
expectContentType(is(`multipart/mixed`)) expectContentType(is(`multipart/mixed`))
// Even if it is HTML, we don't care... we abuse pgp/inline here.
section(t, res, 1). section(t, res, 1).
expectContentType(is(`text/html`)). expectContentType(is(`text/plain`)).
expectBody(contains(`This message could not be decrypted`)). expectBody(contains(`This message could not be decrypted`)).
expectBody(decryptsTo(foreignKR, `<html><body>body</body></html>`)). expectBody(decryptsTo(foreignKR, `<html><body>body</body></html>`)).
expectTransferEncoding(isMissing()) expectTransferEncoding(isMissing())