(t *testing.T)
| 431 | } |
| 432 | |
| 433 | func TestProjectsService_ListUserProjects_error(t *testing.T) { |
| 434 | t.Parallel() |
| 435 | client, mux, _ := setup(t) |
| 436 | mux.HandleFunc("/users/u/projectsV2", func(w http.ResponseWriter, r *http.Request) { |
| 437 | testMethod(t, r, "GET") |
| 438 | fmt.Fprint(w, `[]`) |
| 439 | }) |
| 440 | ctx := t.Context() |
| 441 | const methodName = "ListUserProjects" |
| 442 | testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { |
| 443 | got, resp, err := client.Projects.ListUserProjects(ctx, "u", nil) |
| 444 | if got != nil { |
| 445 | t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got) |
| 446 | } |
| 447 | return resp, err |
| 448 | }) |
| 449 | // bad options (bad username) should error |
| 450 | testBadOptions(t, methodName, func() (err error) { |
| 451 | _, _, err = client.Projects.ListUserProjects(ctx, "\n", nil) |
| 452 | return err |
| 453 | }) |
| 454 | } |
| 455 | |
| 456 | func TestProjectsService_ListOrganizationProjectFields_pagination(t *testing.T) { |
| 457 | t.Parallel() |
nothing calls this directly
no test coverage detected
searching dependent graphs…