databus_test.go 644 B

123456789101112131415161718192021222324252627
  1. package dao
  2. import (
  3. "context"
  4. "go-common/app/job/main/thumbup/model"
  5. "testing"
  6. "github.com/smartystreets/goconvey/convey"
  7. )
  8. func TestDaoPubStatDatabus(t *testing.T) {
  9. convey.Convey("PubStatDatabus", t, func(convCtx convey.C) {
  10. var (
  11. c = context.Background()
  12. business = "archive"
  13. mid = int64(2233)
  14. s = &model.Stats{}
  15. upMid = int64(333)
  16. )
  17. convCtx.Convey("When everything goes positive", func(convCtx convey.C) {
  18. err := d.PubStatDatabus(c, business, mid, s, upMid)
  19. convCtx.Convey("Then err should be nil.", func(convCtx convey.C) {
  20. convCtx.So(err, convey.ShouldBeNil)
  21. })
  22. })
  23. })
  24. }