thumbup_test.go 652 B

123456789101112131415161718192021222324252627282930313233343536
  1. package service
  2. import (
  3. "context"
  4. "testing"
  5. )
  6. func TestServiceAddAct(t *testing.T) {
  7. var (
  8. c = context.TODO()
  9. err error
  10. cid, dmid, mid int64 = 5, 719149462, 3078992
  11. op int8 = 1
  12. )
  13. err = svr.ThumbupDM(c, cid, dmid, mid, op)
  14. if err != nil {
  15. t.Error(err)
  16. }
  17. }
  18. func TestServiceLikeList(t *testing.T) {
  19. var (
  20. c = context.TODO()
  21. err error
  22. cid, mid int64 = 5, 3078992
  23. dmids = []int64{719149462, 719149463}
  24. )
  25. m, err := svr.ThumbupList(c, cid, mid, dmids)
  26. if err != nil {
  27. t.Error(err)
  28. }
  29. for k, v := range m {
  30. t.Logf("=====%d: %+v", k, v)
  31. }
  32. t.Logf("=====%+v", m)
  33. }