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

Function TestIssuesService_IsAssignee_false

github/issues_assignees_test.go:94–125  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

92}
93
94func TestIssuesService_IsAssignee_false(t *testing.T) {
95 t.Parallel()
96 client, mux, _ := setup(t)
97
98 mux.HandleFunc("/repos/o/r/assignees/u", func(w http.ResponseWriter, r *http.Request) {
99 testMethod(t, r, "GET")
100 w.WriteHeader(http.StatusNotFound)
101 })
102
103 ctx := t.Context()
104 assignee, _, err := client.Issues.IsAssignee(ctx, "o", "r", "u")
105 if err != nil {
106 t.Errorf("Issues.IsAssignee returned error: %v", err)
107 }
108 if want := false; assignee != want {
109 t.Errorf("Issues.IsAssignee returned %+v, want %+v", assignee, want)
110 }
111
112 const methodName = "IsAssignee"
113 testBadOptions(t, methodName, func() (err error) {
114 _, _, err = client.Issues.IsAssignee(ctx, "\n", "\n", "\n")
115 return err
116 })
117
118 testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) {
119 got, resp, err := client.Issues.IsAssignee(ctx, "o", "r", "u")
120 if got {
121 t.Errorf("testNewRequestAndDoFailure %v = %#v, want false", methodName, got)
122 }
123 return resp, err
124 })
125}
126
127func TestIssuesService_IsAssignee_error(t *testing.T) {
128 t.Parallel()

Callers

nothing calls this directly

Calls 5

testMethodFunction · 0.85
testBadOptionsFunction · 0.85
IsAssigneeMethod · 0.80
setupFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…