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

Function TestUpdateCollectionObject

collections_test.go:187–198  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

185}
186
187func TestUpdateCollectionObject(t *testing.T) {
188 ctx := context.Background()
189 client, requester := newClient(t)
190
191 data := map[string]any{
192 "name": "Jane",
193 }
194 _, err := client.Collections().Update(ctx, "test-collection", "123", data)
195 require.NoError(t, err)
196 expectedBody := `{"data":{"name":"Jane"}}`
197 testRequest(t, requester.req, http.MethodPut, "https://api.stream-io-api.com/api/v1.0/collections/test-collection/123/?api_key=key", expectedBody)
198}

Callers

nothing calls this directly

Calls 4

newClientFunction · 0.85
testRequestFunction · 0.85
CollectionsMethod · 0.80
UpdateMethod · 0.45

Tested by

no test coverage detected