Smail/server/hooks/telegram_push/telegram_push_test.go
Jinnrry 20f3590a04
V2.4.0 (#89)
* 插件架构改造

* v2.4.0
2024-03-01 19:10:56 +08:00

22 lines
364 B
Go

package main
import (
"pmail/config"
"pmail/dto/parsemail"
"testing"
)
func testInit() {
config.Init()
}
func TestWeChatPushHook_ReceiveParseAfter(t *testing.T) {
testInit()
w := NewTelegramPushHook()
w.ReceiveParseAfter(&parsemail.Email{Subject: "标题", Text: []byte("文本内容"), From: &parsemail.User{
EmailAddress: "hello@gmail.com",
}})
}