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

Function TestGetFollowers

feed_test.go:142–165  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

140}
141
142func TestGetFollowers(t *testing.T) {
143 var (
144 client, requester = newClient(t)
145 ctx = context.Background()
146 f1, _ = newFlatFeedWithUserID(client, "f1")
147 )
148 testCases := []struct {
149 opts []stream.FollowersOption
150 expected string
151 }{
152 {
153 expected: "https://api.stream-io-api.com/api/v1.0/feed/flat/f1/followers/?api_key=key",
154 },
155 {
156 opts: []stream.FollowersOption{stream.WithFollowersLimit(42), stream.WithFollowersOffset(84)},
157 expected: "https://api.stream-io-api.com/api/v1.0/feed/flat/f1/followers/?api_key=key&limit=42&offset=84",
158 },
159 }
160 for _, tc := range testCases {
161 _, err := f1.GetFollowers(ctx, tc.opts...)
162 require.NoError(t, err)
163 testRequest(t, requester.req, http.MethodGet, tc.expected, "")
164 }
165}
166
167func TestUnfollow(t *testing.T) {
168 var (

Callers

nothing calls this directly

Calls 4

newClientFunction · 0.85
newFlatFeedWithUserIDFunction · 0.85
testRequestFunction · 0.85
GetFollowersMethod · 0.80

Tested by

no test coverage detected