MCPcopy Index your code
hub / github.com/google/go-github / TestIssuesService_Unlock

Function TestIssuesService_Unlock

github/issues_test.go:474–498  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

472}
473
474func TestIssuesService_Unlock(t *testing.T) {
475 t.Parallel()
476 client, mux, _ := setup(t)
477
478 mux.HandleFunc("/repos/o/r/issues/1/lock", func(w http.ResponseWriter, r *http.Request) {
479 testMethod(t, r, "DELETE")
480
481 w.WriteHeader(http.StatusNoContent)
482 })
483
484 ctx := t.Context()
485 if _, err := client.Issues.Unlock(ctx, "o", "r", 1); err != nil {
486 t.Errorf("Issues.Unlock returned error: %v", err)
487 }
488
489 const methodName = "Unlock"
490 testBadOptions(t, methodName, func() (err error) {
491 _, err = client.Issues.Unlock(ctx, "\n", "\n", 1)
492 return err
493 })
494
495 testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) {
496 return client.Issues.Unlock(ctx, "o", "r", 1)
497 })
498}
499
500func TestIsPullRequest(t *testing.T) {
501 t.Parallel()

Callers

nothing calls this directly

Calls 5

testMethodFunction · 0.85
testBadOptionsFunction · 0.85
UnlockMethod · 0.80
setupFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…