go-common/app/admin/main/creative/http/academy_test.go

33 lines
571 B
Go
Raw Normal View History

2019-04-22 10:49:16 +00:00
package http
import (
"flag"
"path/filepath"
"testing"
"go-common/app/admin/main/creative/conf"
"go-common/app/admin/main/creative/service"
. "github.com/smartystreets/goconvey/convey"
)
func init() {
dir, _ := filepath.Abs("../cmd/creative-admin.toml")
flag.Set("conf", dir)
conf.Init()
svc = service.New(conf.Conf)
}
func Test_bindTags(t *testing.T) {
var (
oidTIDsMap = map[int64][]int64{
838: {6, 8, 16, 17, 18, 19},
}
)
Convey("bindTags", t, func() {
res, err := bindTags(oidTIDsMap)
So(err, ShouldBeNil)
So(res, ShouldNotBeNil)
})
}