Files
waf-platform/EdgeAPI/internal/senders/mediasenders/media_web_hook_test.go
2026-02-04 20:27:13 +08:00

17 lines
485 B
Go

//go:build plus
package mediasenders
import (
teaconst "github.com/TeaOSLab/EdgeAPI/internal/const"
timeutil "github.com/iwind/TeaGo/utils/time"
"testing"
)
func TestMediaWebHook_Send(t *testing.T) {
media := NewWebHookMedia()
media.URL = "http://127.0.0.1:9991/webhook?subject=${MessageSubject}&body=${MessageBody}"
resp, err := media.Send("zhangsan", "this is subject", "this is body", teaconst.GlobalProductName, timeutil.Format("Y-m-d H:i:s"))
t.Log(string(resp), err)
}