GODT-1556: Add unit test for in-reply-to header without references.

This commit is contained in:
Romain LE JEUNE
2022-11-30 16:32:57 +01:00
parent f3cc19b09c
commit 842c9c8ecd
2 changed files with 36 additions and 0 deletions

View File

@ -605,6 +605,16 @@ func TestParseMessageReferencesComma(t *testing.T) {
})
}
func TestParseMessageReplyToWithoutReferences(t *testing.T) {
f := getFileReader("reply-to_no_references.eml")
m, err := Parse(f)
require.NoError(t, err)
assert.ElementsMatch(t, m.References, []string{})
assert.Equal(t, m.InReplyTo, "OEUOEUEOUOUOU770B9QNZWFVGM@protonmail.ch")
}
func TestParseIcsAttachment(t *testing.T) {
f := getFileReader("ics_attachment.eml")

View File

@ -0,0 +1,26 @@
Content-Type: multipart/mixed;
boundary=987c7102dcaf02d01860ce777b465f86d39ec16a3b4e12605eb6b0eb200a
X-Original-To: someone@protonmail.com
Delivered-To: someone@protonmail.com
Date: Sun, 04 Aug 2019 13:03:26 +0000
From: ProtonVPN <support@protonvpn.something.com>
Reply-To: ProtonVPN <support+id493949@protonvpn.something.com>
To: someone <someone@protonmail.com>
Message-Id: <OEUOEUOUOU_5d46d79df036f_1d78b3fd8f42bcf2014719e_sprut@something.com>
In-Reply-To: <OEUOEUEOUOUOU770B9QNZWFVGM@protonmail.ch>
Subject: Some test subject
Mime-Version: 1.0
--987c7102dcaf02d01860ce777b465f86d39ec16a3b4e12605eb6b0eb200a
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset=utf-8
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.=
w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<body>
test test test
</body>
</html>
--987c7102dcaf02d01860ce777b465f86d39ec16a3b4e12605eb6b0eb200a--