(t *testing.T)
| 65 | } |
| 66 | |
| 67 | func TestUpdateActivities(t *testing.T) { |
| 68 | var ( |
| 69 | client, requester = newClient(t) |
| 70 | ctx = context.Background() |
| 71 | now = getTime(time.Now()) |
| 72 | bobActivity = stream.Activity{ |
| 73 | Actor: "bob", |
| 74 | Verb: "like", |
| 75 | Object: "ice-cream", |
| 76 | ForeignID: "bob:123", |
| 77 | Time: now, |
| 78 | Extra: map[string]any{"influence": 42}, |
| 79 | } |
| 80 | ) |
| 81 | _, err := client.UpdateActivities(ctx, bobActivity) |
| 82 | require.NoError(t, err) |
| 83 | |
| 84 | body := fmt.Sprintf(`{"activities":[{"actor":"bob","foreign_id":"bob:123","influence":42,"object":"ice-cream","time":%q,"verb":"like"}]}`, now.Format(stream.TimeLayout)) |
| 85 | testRequest(t, requester.req, http.MethodPost, "https://api.stream-io-api.com/api/v1.0/activities/?api_key=key", body) |
| 86 | } |
| 87 | |
| 88 | func TestFollow(t *testing.T) { |
| 89 | var ( |
nothing calls this directly
no test coverage detected