You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
759 B

  1. package jg_push
  2. import (
  3. "code.fnuoos.com/go_rely_warehouse/zyos_go_jg_push.git/md"
  4. "encoding/json"
  5. "testing"
  6. )
  7. func TestPush(t *testing.T) {
  8. var aud = md.PushAudience{Alias: []string{"123456_736"}}
  9. var extrasData = md.NextCommModData{}
  10. extrasStr, _ := json.Marshal(extrasData)
  11. var extras = md.SkipData{
  12. SkipName: "测试",
  13. SkipIdentifier: "pub.flutter.invite_friends",
  14. RequiredLogin: "1",
  15. RequiredTaobaoAuth: "0",
  16. IsJump: "1",
  17. Url: "",
  18. Data: string(extrasStr),
  19. }
  20. var param = md.PushParam{
  21. Platform: "all",
  22. Audience: aud,
  23. Title: "API推送",
  24. Content: "哈哈哈哈",
  25. Extras: extras,
  26. }
  27. Send("6033fc3e19543740413d19aa", "ca7db52b63f7833299042f6a1", param)
  28. }