(t *testing.T)
| 242 | } |
| 243 | |
| 244 | func TestUsersService_IsFollowing_false(t *testing.T) { |
| 245 | t.Parallel() |
| 246 | client, mux, _ := setup(t) |
| 247 | |
| 248 | mux.HandleFunc("/users/u/following/t", func(w http.ResponseWriter, r *http.Request) { |
| 249 | testMethod(t, r, "GET") |
| 250 | w.WriteHeader(http.StatusNotFound) |
| 251 | }) |
| 252 | |
| 253 | ctx := t.Context() |
| 254 | following, _, err := client.Users.IsFollowing(ctx, "u", "t") |
| 255 | if err != nil { |
| 256 | t.Errorf("Users.IsFollowing returned error: %v", err) |
| 257 | } |
| 258 | if want := false; following != want { |
| 259 | t.Errorf("Users.IsFollowing returned %+v, want %+v", following, want) |
| 260 | } |
| 261 | |
| 262 | const methodName = "IsFollowing" |
| 263 | testBadOptions(t, methodName, func() (err error) { |
| 264 | _, _, err = client.Users.IsFollowing(ctx, "\n", "\n") |
| 265 | return err |
| 266 | }) |
| 267 | |
| 268 | testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { |
| 269 | got, resp, err := client.Users.IsFollowing(ctx, "u", "t") |
| 270 | if got { |
| 271 | t.Errorf("testNewRequestAndDoFailure %v = %#v, want false", methodName, got) |
| 272 | } |
| 273 | return resp, err |
| 274 | }) |
| 275 | } |
| 276 | |
| 277 | func TestUsersService_IsFollowing_error(t *testing.T) { |
| 278 | t.Parallel() |
nothing calls this directly
no test coverage detected
searching dependent graphs…