(t *testing.T)
| 140 | } |
| 141 | |
| 142 | func 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 | |
| 167 | func TestUnfollow(t *testing.T) { |
| 168 | var ( |
nothing calls this directly
no test coverage detected