feat: create standalone native fnOS repository

This commit is contained in:
2026-10-02 15:19:09 +08:00
parent 69f3c30fab
commit 6725fc131d
492 changed files with 94023 additions and 3 deletions
+17
View File
@@ -0,0 +1,17 @@
package notify
import (
"strings"
"testing"
)
func TestBuildMailBody(t *testing.T) {
content := FormatAlert("test", "标题", "正文")
body := string(buildMailBody("from@example.com", []string{"to@example.com"}, content.Subject, content.PlainBody))
if !strings.Contains(body, "Subject: [Havline]") {
t.Fatalf("missing subject: %s", body)
}
if !strings.Contains(body, "正文") {
t.Fatalf("missing message: %s", body)
}
}