notify_test.go 748 B

12345678910111213141516171819202122232425262728293031323334
  1. package dao
  2. import (
  3. "context"
  4. "testing"
  5. "github.com/smartystreets/goconvey/convey"
  6. )
  7. func TestDaonotifyURI(t *testing.T) {
  8. convey.Convey("notifyURI", t, func(ctx convey.C) {
  9. ctx.Convey("When everything gose positive", func(ctx convey.C) {
  10. p1 := testDao.notifyURI()
  11. ctx.Convey("Then p1 should not be nil.", func(ctx convey.C) {
  12. ctx.So(p1, convey.ShouldNotBeNil)
  13. })
  14. })
  15. })
  16. }
  17. func TestDaoSendNotify(t *testing.T) {
  18. convey.Convey("SendNotify", t, func(ctx convey.C) {
  19. var (
  20. c = context.Background()
  21. title = ""
  22. content = ""
  23. dataType = ""
  24. mids = []int64{}
  25. )
  26. ctx.Convey("When everything gose positive", func(ctx convey.C) {
  27. testDao.SendNotify(c, title, content, dataType, mids)
  28. })
  29. })
  30. }