(t *testing.T)
| 336 | } |
| 337 | |
| 338 | func TestCreateCodespaces_displayName(t *testing.T) { |
| 339 | svr := createFakeCreateEndpointServer(t, http.StatusCreated) |
| 340 | defer svr.Close() |
| 341 | |
| 342 | api := API{ |
| 343 | githubAPI: svr.URL, |
| 344 | client: createHttpClient, |
| 345 | } |
| 346 | |
| 347 | retentionPeriod := 0 |
| 348 | codespace, err := api.CreateCodespace(context.Background(), &CreateCodespaceParams{ |
| 349 | RepositoryID: 1, |
| 350 | IdleTimeoutMinutes: 10, |
| 351 | RetentionPeriodMinutes: &retentionPeriod, |
| 352 | DisplayName: "clucky cuckoo", |
| 353 | }) |
| 354 | if err != nil { |
| 355 | t.Fatal(err) |
| 356 | } |
| 357 | |
| 358 | if codespace.DisplayName != "clucky cuckoo" { |
| 359 | t.Fatalf("expected display name %q, got %q", "clucky cuckoo", codespace.DisplayName) |
| 360 | } |
| 361 | } |
| 362 | |
| 363 | func TestCreateCodespaces_Pending(t *testing.T) { |
| 364 | svr := createFakeCreateEndpointServer(t, http.StatusAccepted) |
nothing calls this directly
no test coverage detected