abserver_test.go 616 B

123456789101112131415161718192021222324252627
  1. package dao
  2. import (
  3. "context"
  4. "testing"
  5. "github.com/smartystreets/goconvey/convey"
  6. )
  7. func TestDaoAbServer(t *testing.T) {
  8. convey.Convey("AbServer", t, func(ctx convey.C) {
  9. var (
  10. c = context.Background()
  11. mid = int64(0)
  12. platform = int(0)
  13. channel = "test"
  14. buvid = "test"
  15. )
  16. ctx.Convey("When everything goes positive", func(ctx convey.C) {
  17. res, err := d.AbServer(c, mid, platform, channel, buvid)
  18. ctx.Convey("Then err should be nil.res should not be nil.", func(ctx convey.C) {
  19. ctx.So(err, convey.ShouldBeNil)
  20. ctx.So(res, convey.ShouldNotBeNil)
  21. })
  22. })
  23. })
  24. }