From f4405b5186aebca084e241d03856f3c595fea4fe Mon Sep 17 00:00:00 2001 From: Michal Horejsek Date: Wed, 27 Jan 2021 10:21:21 +0100 Subject: [PATCH] Fix tests after rebase --- test/fakeapi/messages.go | 5 +++++ test/features/bridge/imap/message/import.feature | 5 +++++ test/features/bridge/imap/message/move_local_folder.feature | 4 ++++ 3 files changed, 14 insertions(+) diff --git a/test/fakeapi/messages.go b/test/fakeapi/messages.go index 5771e3a5..208b26b7 100644 --- a/test/fakeapi/messages.go +++ b/test/fakeapi/messages.go @@ -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 } diff --git a/test/features/bridge/imap/message/import.feature b/test/features/bridge/imap/message/import.feature index 9a210481..48ef6f74 100644 --- a/test/features/bridge/imap/message/import.feature +++ b/test/features/bridge/imap/message/import.feature @@ -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 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 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 íááá diff --git a/test/features/bridge/imap/message/move_local_folder.feature b/test/features/bridge/imap/message/move_local_folder.feature index 39b1a089..da35023c 100644 --- a/test/features/bridge/imap/message/move_local_folder.feature +++ b/test/features/bridge/imap/message/move_local_folder.feature @@ -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: + 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: + 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: 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 """