(t *testing.T)
| 51 | } |
| 52 | |
| 53 | func TestAddActivities(t *testing.T) { |
| 54 | var ( |
| 55 | client, requester = newClient(t) |
| 56 | ctx = context.Background() |
| 57 | flat, _ = newFlatFeedWithUserID(client, "123") |
| 58 | bobActivity = stream.Activity{Actor: "bob", Verb: "like", Object: "ice-cream"} |
| 59 | aliceActivity = stream.Activity{Actor: "alice", Verb: "dislike", Object: "ice-cream", To: []string{"flat:456"}} |
| 60 | ) |
| 61 | _, err := flat.AddActivities(ctx, bobActivity, aliceActivity) |
| 62 | require.NoError(t, err) |
| 63 | body := `{"activities":[{"actor":"bob","object":"ice-cream","verb":"like"},{"actor":"alice","object":"ice-cream","to":["flat:456"],"verb":"dislike"}]}` |
| 64 | testRequest(t, requester.req, http.MethodPost, "https://api.stream-io-api.com/api/v1.0/feed/flat/123/?api_key=key", body) |
| 65 | } |
| 66 | |
| 67 | func TestUpdateActivities(t *testing.T) { |
| 68 | var ( |
nothing calls this directly
no test coverage detected