Fix tests after rebase

This commit is contained in:
Michal Horejsek
2021-01-27 10:21:21 +01:00
parent 76dda10572
commit f4405b5186
3 changed files with 14 additions and 0 deletions

View File

@ -218,6 +218,11 @@ func (api *FakePMAPI) generateMessageFromImportRequest(msgReq *pmapi.ImportMsgRe
existingMsg := api.findMessage(m)
if existingMsg != nil {
for _, newLabelID := range api.generateLabelIDsFromImportRequest(msgReq) {
if !existingMsg.HasLabelID(newLabelID) {
existingMsg.LabelIDs = append(existingMsg.LabelIDs, newLabelID)
}
}
return existingMsg, nil
}

View File

@ -12,6 +12,7 @@ Feature: IMAP import messages
Subject: Message with double charset in content type
Content-Type: text/plain; charset=utf-8; charset=utf-8
Content-Disposition: inline
Received: by 2002:0:0:0:0:0:0:0 with SMTP id 0123456789abcdef; Wed, 30 Dec 2020 01:23:45 0000
Hello
@ -26,6 +27,7 @@ Feature: IMAP import messages
To: Internal Bridge <bridgetest@protonmail.com>
Subject: Message with attachment name encoded by RFC 2047 without quoting
Content-type: multipart/mixed; boundary="boundary"
Received: by 2002:0:0:0:0:0:0:0 with SMTP id 0123456789abcdef; Wed, 30 Dec 2020 01:23:45 0000
--boundary
Content-Type: text/plain
@ -50,6 +52,7 @@ Feature: IMAP import messages
To: Internal Bridge <bridgetest@protonmail.com>
Subject: Message in latin1 without content type
Content-Disposition: inline
Received: by 2002:0:0:0:0:0:0:0 with SMTP id 0123456789abcdef; Wed, 30 Dec 2020 01:23:45 0000
Hello íááá
@ -64,6 +67,7 @@ Feature: IMAP import messages
Subject: Message in latin1 with content type
Content-Disposition: inline
Content-Type: text/plain; charset=latin1
Received: by 2002:0:0:0:0:0:0:0 with SMTP id 0123456789abcdef; Wed, 30 Dec 2020 01:23:45 0000
Hello íááá
@ -78,6 +82,7 @@ Feature: IMAP import messages
Subject: Message in latin1 with wrong content type
Content-Disposition: inline
Content-Type: text/plain; charset=KOI8R
Received: by 2002:0:0:0:0:0:0:0 with SMTP id 0123456789abcdef; Wed, 30 Dec 2020 01:23:45 0000
Hello íááá

View File

@ -19,6 +19,7 @@ Feature: IMAP move message out to and back from local folder
Subject: foo
Date: Mon, 02 Jan 2006 15:04:05 +0000
Message-Id: <msgID>
Received: by 2002:0:0:0:0:0:0:0 with SMTP id 0123456789abcdef; Wed, 30 Dec 2020 01:23:45 0000
hello
"""
@ -32,6 +33,7 @@ Feature: IMAP move message out to and back from local folder
Subject: foo
Date: Mon, 02 Jan 2006 15:04:05 +0000
Message-Id: <msgID>
Received: by 2002:0:0:0:0:0:0:0 with SMTP id 0123456789abcdef; Wed, 30 Dec 2020 01:23:45 0000
hello
"""
@ -52,6 +54,7 @@ Feature: IMAP move message out to and back from local folder
To: <user@pm.me>
Subject: foo
Date: Mon, 02 Jan 2006 15:04:05 +0000
Received: by 2002:0:0:0:0:0:0:0 with SMTP id 0123456789abcdef; Wed, 30 Dec 2020 01:23:45 0000
hello
"""
@ -66,6 +69,7 @@ Feature: IMAP move message out to and back from local folder
Subject: bar
Date: Mon, 02 Jan 2006 15:04:05 +0000
X-Pm-Internal-Id: 1
Received: by 2002:0:0:0:0:0:0:0 with SMTP id 0123456789abcdef; Wed, 30 Dec 2020 01:23:45 0000
hello
"""