test(GODT-1224): Add testing around package creation.

This commit is contained in:
Romain Le Jeune
2023-11-02 07:24:43 +00:00
parent 07f93d276b
commit 1ac4e70115
4 changed files with 1280 additions and 3 deletions

View File

@ -18,6 +18,8 @@
package smtp
import (
"fmt"
"github.com/ProtonMail/gluon/rfc822"
"github.com/ProtonMail/go-proton-api"
"github.com/ProtonMail/gopenpgp/v2/crypto"
@ -54,6 +56,10 @@ func createSendReq(
return proton.SendDraftReq{}, err
}
}
if recs := recs.content(rfc822.MultipartMixed); len(recs) > 0 {
return proton.SendDraftReq{}, fmt.Errorf("invalid MIME type for MIME package: %s", rfc822.MultipartMixed)
}
}
return req, nil

File diff suppressed because it is too large Load Diff