17 lines
485 B
Go
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)
|
|
}
|