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

Function TestUpdateUser

users_test.go:79–90  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

77}
78
79func TestUpdateUser(t *testing.T) {
80 ctx := context.Background()
81 client, requester := newClient(t)
82
83 data := map[string]any{
84 "name": "Jane",
85 }
86 _, err := client.Users().Update(ctx, "123", data)
87 require.NoError(t, err)
88 expectedBody := `{"data":{"name":"Jane"}}`
89 testRequest(t, requester.req, http.MethodPut, "https://api.stream-io-api.com/api/v1.0/user/123/?api_key=key", expectedBody)
90}

Callers

nothing calls this directly

Calls 4

newClientFunction · 0.85
testRequestFunction · 0.85
UsersMethod · 0.80
UpdateMethod · 0.45

Tested by

no test coverage detected