api_test.go 592 B

1234567891011121314151617181920212223242526
  1. package newcomer
  2. import (
  3. "context"
  4. "testing"
  5. "github.com/smartystreets/goconvey/convey"
  6. )
  7. func TestNewcomerSendNotify(t *testing.T) {
  8. convey.Convey("Msg", t, func(ctx convey.C) {
  9. var (
  10. c = context.Background()
  11. mids = []int64{27515405}
  12. mc = "1_17_2"
  13. title = "creative"
  14. context = "sssss"
  15. )
  16. ctx.Convey("When everything goes positive", func(ctx convey.C) {
  17. err := d.SendNotify(c, mids, mc, title, context)
  18. ctx.Convey("Then err should be nil.msg should not be nil.", func(ctx convey.C) {
  19. ctx.So(err, convey.ShouldEqual, err)
  20. })
  21. })
  22. })
  23. }