test: set sent label properly

This commit is contained in:
James Houlahan
2020-07-03 08:22:28 +02:00
parent 10e384f4df
commit b25baa2524
3 changed files with 17 additions and 8 deletions

View File

@ -81,11 +81,17 @@ func thereAreMessagesInMailboxesForAddressOfUser(mailboxNames, bddAddressID, bdd
if err != nil {
return internalError(err, "getting labels %s for %s", mailboxNames, account.Username())
}
message := &pmapi.Message{
MIMEType: "text/plain",
LabelIDs: labelIDs,
AddressID: account.AddressID(),
}
if message.HasLabelID(pmapi.SentLabel) {
message.Flags |= pmapi.FlagSent
}
for n, cell := range messages.Rows[i].Cells {
switch head[n].Value {
case "from":