dynamic_test.go 443 B

12345678910111213141516171819202122
  1. package web
  2. import (
  3. "context"
  4. "testing"
  5. "github.com/smartystreets/goconvey/convey"
  6. )
  7. func TestWebPushAll(t *testing.T) {
  8. var (
  9. c = context.Background()
  10. msg = `{"1":64060766,"180":23753334,"31":49310729,"live":516587}`
  11. ip = "127.0.0.1"
  12. )
  13. convey.Convey("PushAll", t, func(ctx convey.C) {
  14. err := d.PushAll(c, msg, ip)
  15. ctx.Convey("Then err should be nil.", func(ctx convey.C) {
  16. ctx.So(err, convey.ShouldBeNil)
  17. })
  18. })
  19. }