(t *testing.T)
| 115 | } |
| 116 | |
| 117 | func TestGetFollowing(t *testing.T) { |
| 118 | var ( |
| 119 | client, requester = newClient(t) |
| 120 | ctx = context.Background() |
| 121 | f1, _ = newFlatFeedWithUserID(client, "f1") |
| 122 | ) |
| 123 | testCases := []struct { |
| 124 | opts []stream.FollowingOption |
| 125 | expected string |
| 126 | }{ |
| 127 | { |
| 128 | expected: "https://api.stream-io-api.com/api/v1.0/feed/flat/f1/follows/?api_key=key", |
| 129 | }, |
| 130 | { |
| 131 | opts: []stream.FollowingOption{stream.WithFollowingFilter("filter"), stream.WithFollowingLimit(42), stream.WithFollowingOffset(84)}, |
| 132 | expected: "https://api.stream-io-api.com/api/v1.0/feed/flat/f1/follows/?api_key=key&filter=filter&limit=42&offset=84", |
| 133 | }, |
| 134 | } |
| 135 | for _, tc := range testCases { |
| 136 | _, err := f1.GetFollowing(ctx, tc.opts...) |
| 137 | require.NoError(t, err) |
| 138 | testRequest(t, requester.req, http.MethodGet, tc.expected, "") |
| 139 | } |
| 140 | } |
| 141 | |
| 142 | func TestGetFollowers(t *testing.T) { |
| 143 | var ( |
nothing calls this directly
no test coverage detected