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.
27 lines
481 B
27 lines
481 B
package message
|
|
|
|
import (
|
|
log "github.com/sirupsen/logrus"
|
|
"sendmsg/common"
|
|
"sendmsg/global"
|
|
"testing"
|
|
"time"
|
|
)
|
|
|
|
func TestSend(t *testing.T) {
|
|
conf, err := common.InitConfig()
|
|
if err != nil {
|
|
log.Println("[test] Failed to initialize config: ", err)
|
|
}
|
|
global.GLO_CONF = conf
|
|
|
|
m := GetType()
|
|
if !Enabled() || m == nil {
|
|
t.Fatalf("[test] Failed to get type...")
|
|
}
|
|
m.Send(Body{
|
|
Title: "Hello",
|
|
Content: "World " + time.Now().Format("2006-01-02 15:04:05"),
|
|
})
|
|
}
|