GODT-2223: Testing event processing scenarios.

This commit is contained in:
Jakub
2023-01-25 09:36:48 +01:00
parent 996c6826b9
commit 160489a771
5 changed files with 262 additions and 113 deletions

View File

@ -24,6 +24,7 @@ import (
"net/mail"
"strings"
"github.com/ProtonMail/gluon/rfc822"
"github.com/ProtonMail/go-proton-api"
"github.com/ProtonMail/gopenpgp/v2/crypto"
"github.com/ProtonMail/proton-bridge/v3/internal/bridge"
@ -265,9 +266,12 @@ func (s *scenario) theFollowingFieldsWereChangedInDraftForAddressOfAccount(draft
var changes proton.DraftTemplate
if wantMessages[0].From != "" {
return fmt.Errorf("changing from address is not supported")
return fmt.Errorf("changing From address is not supported")
}
changes.Sender = &mail.Address{Address: address}
changes.MIMEType = rfc822.TextPlain
if wantMessages[0].To != "" {
changes.ToList = []*mail.Address{{Address: wantMessages[0].To}}
}