academy_test.go 571 B

1234567891011121314151617181920212223242526272829303132
  1. package http
  2. import (
  3. "flag"
  4. "path/filepath"
  5. "testing"
  6. "go-common/app/admin/main/creative/conf"
  7. "go-common/app/admin/main/creative/service"
  8. . "github.com/smartystreets/goconvey/convey"
  9. )
  10. func init() {
  11. dir, _ := filepath.Abs("../cmd/creative-admin.toml")
  12. flag.Set("conf", dir)
  13. conf.Init()
  14. svc = service.New(conf.Conf)
  15. }
  16. func Test_bindTags(t *testing.T) {
  17. var (
  18. oidTIDsMap = map[int64][]int64{
  19. 838: {6, 8, 16, 17, 18, 19},
  20. }
  21. )
  22. Convey("bindTags", t, func() {
  23. res, err := bindTags(oidTIDsMap)
  24. So(err, ShouldBeNil)
  25. So(res, ShouldNotBeNil)
  26. })
  27. }