#11: implement MTA-STS, TLS-RPT & Autoconfig HTTP services
This commit is contained in:
1 parent
c0042ef207
commit
314eb67dda
20 files changed
+1177
-31
No files matched your search
@@ -0,0 +1,26 @@
|
||||
package valueobject
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestBuildThunderbirdAutoconfigXML(t *testing.T) {
|
||||
xml := BuildThunderbirdAutoconfigXML("example.test", "mail.example.test")
|
||||
if !strings.Contains(xml, "<hostname>mail.example.test</hostname>") {
|
||||
t.Errorf("missing mail host: %s", xml)
|
||||
}
|
||||
if !strings.Contains(xml, "<port>993</port>") {
|
||||
t.Errorf("missing port 993: %s", xml)
|
||||
}
|
||||
}
|
||||
|
||||
func TestBuildOutlookAutodiscoverXML(t *testing.T) {
|
||||
xml := BuildOutlookAutodiscoverXML("example.test", "mail.example.test", "user@example.test")
|
||||
if !strings.Contains(xml, "<Server>mail.example.test</Server>") {
|
||||
t.Errorf("missing Server: %s", xml)
|
||||
}
|
||||
if !strings.Contains(xml, "<LoginName>user@example.test</LoginName>") {
|
||||
t.Errorf("missing LoginName: %s", xml)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user