telegram_push_test.go 364 B

123456789101112131415161718192021
  1. package main
  2. import (
  3. "pmail/config"
  4. "pmail/dto/parsemail"
  5. "testing"
  6. )
  7. func testInit() {
  8. config.Init()
  9. }
  10. func TestWeChatPushHook_ReceiveParseAfter(t *testing.T) {
  11. testInit()
  12. w := NewTelegramPushHook()
  13. w.ReceiveParseAfter(&parsemail.Email{Subject: "标题", Text: []byte("文本内容"), From: &parsemail.User{
  14. EmailAddress: "hello@gmail.com",
  15. }})
  16. }