MCPcopy Create free account
hub / github.com/GetStream/stream-go2 / TestAddToMany

Function TestAddToMany

client_test.go:29–42  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

27}
28
29func TestAddToMany(t *testing.T) {
30 var (
31 client, requester = newClient(t)
32 ctx = context.Background()
33 activity = stream.Activity{Actor: "bob", Verb: "like", Object: "cake"}
34 flat, _ = newFlatFeedWithUserID(client, "123")
35 aggregated, _ = newAggregatedFeedWithUserID(client, "123")
36 )
37
38 err := client.AddToMany(ctx, activity, flat, aggregated)
39 require.NoError(t, err)
40 body := `{"activity":{"actor":"bob","object":"cake","verb":"like"},"feeds":["flat:123","aggregated:123"]}`
41 testRequest(t, requester.req, http.MethodPost, "https://api.stream-io-api.com/api/v1.0/feed/add_to_many/?api_key=key", body)
42}
43
44func TestFollowMany(t *testing.T) {
45 var (

Callers

nothing calls this directly

Calls 5

newClientFunction · 0.85
newFlatFeedWithUserIDFunction · 0.85
testRequestFunction · 0.85
AddToManyMethod · 0.80

Tested by

no test coverage detected