MCPcopy Create free account
hub / github.com/google/go-github / TestCodespacesService_Delete

Function TestCodespacesService_Delete

github/codespaces_test.go:272–295  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

270}
271
272func TestCodespacesService_Delete(t *testing.T) {
273 t.Parallel()
274 client, mux, _ := setup(t)
275
276 mux.HandleFunc("/user/codespaces/codespace_1", func(_ http.ResponseWriter, r *http.Request) {
277 testMethod(t, r, "DELETE")
278 })
279
280 ctx := t.Context()
281 _, err := client.Codespaces.Delete(ctx, "codespace_1")
282 if err != nil {
283 t.Errorf("Codespaces.Delete return error: %v", err)
284 }
285
286 const methodName = "Delete"
287 testBadOptions(t, methodName, func() (err error) {
288 _, err = client.Codespaces.Delete(ctx, "\n")
289 return err
290 })
291
292 testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) {
293 return client.Codespaces.Delete(ctx, "codespace_1")
294 })
295}
296
297func TestCodespacesService_ListDevContainerConfigurations(t *testing.T) {
298 t.Parallel()

Callers

nothing calls this directly

Calls 5

testMethodFunction · 0.85
testBadOptionsFunction · 0.85
setupFunction · 0.70
DeleteMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…