You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
454 B

2 years ago
package message
import (
"sendmsg/common"
2 years ago
"sendmsg/global"
"testing"
"time"
2 years ago
)
func TestSend(t *testing.T) {
conf, err := common.InitConfig()
2 years ago
if err != nil {
2 years ago
common.Log.Println("[test] Failed to initialize config: ", err)
2 years ago
}
global.GLO_CONF = conf
m := GetType()
if !Enabled() || m == nil {
t.Fatalf("[test] Failed to get type...")
2 years ago
}
m.Send(Body{
Title: "Hello",
Content: "World " + time.Now().Format("2006-01-02 15:04:05"),
2 years ago
})
}