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.

23 lines
425 B

package service
import (
"sendmsg/config"
"sendmsg/global"
"sendmsg/message"
"testing"
"time"
)
func TestService(t *testing.T) {
conf, err := config.InitConfig()
if err != nil {
t.Fatalf("Failed to initialize config: %v", err)
}
global.GLO_CONF = conf
var s = Service{Body: message.Body{
Title: "test title",
Content: "this is content, time is " + time.Now().Format("2006-01-02 15:04:05"),
}}
s.Run()
}