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

Function TestIssuesService_LockWithReason

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

Source from the content-addressed store, hash-verified

455}
456
457func TestIssuesService_LockWithReason(t *testing.T) {
458 t.Parallel()
459 client, mux, _ := setup(t)
460
461 mux.HandleFunc("/repos/o/r/issues/1/lock", func(w http.ResponseWriter, r *http.Request) {
462 testMethod(t, r, "PUT")
463 w.WriteHeader(http.StatusNoContent)
464 })
465
466 opt := &LockIssueOptions{LockReason: "off-topic"}
467
468 ctx := t.Context()
469 if _, err := client.Issues.Lock(ctx, "o", "r", 1, opt); err != nil {
470 t.Errorf("Issues.Lock returned error: %v", err)
471 }
472}
473
474func TestIssuesService_Unlock(t *testing.T) {
475 t.Parallel()

Callers

nothing calls this directly

Calls 3

testMethodFunction · 0.85
LockMethod · 0.80
setupFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…