mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-10 04:36:43 +00:00
test(GODT-1224): Add testing around package creation.
This commit is contained in:
@ -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
|
||||
|
||||
1271
internal/services/smtp/smtp_packages_test.go
Normal file
1271
internal/services/smtp/smtp_packages_test.go
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user