forked from Silverfish/proton-bridge
Fix tests after rebase
This commit is contained in:
@ -218,6 +218,11 @@ func (api *FakePMAPI) generateMessageFromImportRequest(msgReq *pmapi.ImportMsgRe
|
|||||||
|
|
||||||
existingMsg := api.findMessage(m)
|
existingMsg := api.findMessage(m)
|
||||||
if existingMsg != nil {
|
if existingMsg != nil {
|
||||||
|
for _, newLabelID := range api.generateLabelIDsFromImportRequest(msgReq) {
|
||||||
|
if !existingMsg.HasLabelID(newLabelID) {
|
||||||
|
existingMsg.LabelIDs = append(existingMsg.LabelIDs, newLabelID)
|
||||||
|
}
|
||||||
|
}
|
||||||
return existingMsg, nil
|
return existingMsg, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -12,6 +12,7 @@ Feature: IMAP import messages
|
|||||||
Subject: Message with double charset in content type
|
Subject: Message with double charset in content type
|
||||||
Content-Type: text/plain; charset=utf-8; charset=utf-8
|
Content-Type: text/plain; charset=utf-8; charset=utf-8
|
||||||
Content-Disposition: inline
|
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
|
Hello
|
||||||
|
|
||||||
@ -26,6 +27,7 @@ Feature: IMAP import messages
|
|||||||
To: Internal Bridge <bridgetest@protonmail.com>
|
To: Internal Bridge <bridgetest@protonmail.com>
|
||||||
Subject: Message with attachment name encoded by RFC 2047 without quoting
|
Subject: Message with attachment name encoded by RFC 2047 without quoting
|
||||||
Content-type: multipart/mixed; boundary="boundary"
|
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
|
--boundary
|
||||||
Content-Type: text/plain
|
Content-Type: text/plain
|
||||||
@ -50,6 +52,7 @@ Feature: IMAP import messages
|
|||||||
To: Internal Bridge <bridgetest@protonmail.com>
|
To: Internal Bridge <bridgetest@protonmail.com>
|
||||||
Subject: Message in latin1 without content type
|
Subject: Message in latin1 without content type
|
||||||
Content-Disposition: inline
|
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 íááá
|
Hello íááá
|
||||||
|
|
||||||
@ -64,6 +67,7 @@ Feature: IMAP import messages
|
|||||||
Subject: Message in latin1 with content type
|
Subject: Message in latin1 with content type
|
||||||
Content-Disposition: inline
|
Content-Disposition: inline
|
||||||
Content-Type: text/plain; charset=latin1
|
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 íááá
|
Hello íááá
|
||||||
|
|
||||||
@ -78,6 +82,7 @@ Feature: IMAP import messages
|
|||||||
Subject: Message in latin1 with wrong content type
|
Subject: Message in latin1 with wrong content type
|
||||||
Content-Disposition: inline
|
Content-Disposition: inline
|
||||||
Content-Type: text/plain; charset=KOI8R
|
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 íááá
|
Hello íááá
|
||||||
|
|
||||||
|
|||||||
@ -19,6 +19,7 @@ Feature: IMAP move message out to and back from local folder
|
|||||||
Subject: foo
|
Subject: foo
|
||||||
Date: Mon, 02 Jan 2006 15:04:05 +0000
|
Date: Mon, 02 Jan 2006 15:04:05 +0000
|
||||||
Message-Id: <msgID>
|
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
|
hello
|
||||||
"""
|
"""
|
||||||
@ -32,6 +33,7 @@ Feature: IMAP move message out to and back from local folder
|
|||||||
Subject: foo
|
Subject: foo
|
||||||
Date: Mon, 02 Jan 2006 15:04:05 +0000
|
Date: Mon, 02 Jan 2006 15:04:05 +0000
|
||||||
Message-Id: <msgID>
|
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
|
hello
|
||||||
"""
|
"""
|
||||||
@ -52,6 +54,7 @@ Feature: IMAP move message out to and back from local folder
|
|||||||
To: <user@pm.me>
|
To: <user@pm.me>
|
||||||
Subject: foo
|
Subject: foo
|
||||||
Date: Mon, 02 Jan 2006 15:04:05 +0000
|
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
|
hello
|
||||||
"""
|
"""
|
||||||
@ -66,6 +69,7 @@ Feature: IMAP move message out to and back from local folder
|
|||||||
Subject: bar
|
Subject: bar
|
||||||
Date: Mon, 02 Jan 2006 15:04:05 +0000
|
Date: Mon, 02 Jan 2006 15:04:05 +0000
|
||||||
X-Pm-Internal-Id: 1
|
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
|
hello
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user