databus_test.go 461 B

123456789101112131415161718192021222324252627
  1. package dao
  2. import (
  3. "context"
  4. "fmt"
  5. "testing"
  6. "time"
  7. "go-common/app/interface/main/dm/model"
  8. . "github.com/smartystreets/goconvey/convey"
  9. )
  10. func TestSendAction(t *testing.T) {
  11. var (
  12. c = context.TODO()
  13. act = &model.ReportAction{
  14. Cid: int64(10106598),
  15. Did: int64(719918177),
  16. HideTime: time.Now().Unix() + 10,
  17. }
  18. )
  19. Convey("", t, func() {
  20. err := testDao.SendAction(c, fmt.Sprint(act.Cid), act)
  21. So(err, ShouldBeNil)
  22. })
  23. }