notify_test.go 612 B

123456789101112131415161718192021222324252627
  1. package dao
  2. import (
  3. "context"
  4. "testing"
  5. "go-common/app/admin/main/workflow/model/param"
  6. "go-common/app/job/main/workflow/model"
  7. "github.com/smartystreets/goconvey/convey"
  8. )
  9. func TestDaoSendMessage(t *testing.T) {
  10. convey.Convey("SendMessage", t, func(ctx convey.C) {
  11. var (
  12. c = context.Background()
  13. chs = []*model.ChallRes{}
  14. msg = &param.MessageParam{}
  15. )
  16. ctx.Convey("When everything gose positive", func(ctx convey.C) {
  17. err := d.SendMessage(c, chs, msg)
  18. ctx.Convey("Then err should be nil.", func(ctx convey.C) {
  19. ctx.So(err.Error(), convey.ShouldEqual, "-6")
  20. })
  21. })
  22. })
  23. }