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

Function TestIssuesService_IsAssignee_true

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

Source from the content-addressed store, hash-verified

60}
61
62func TestIssuesService_IsAssignee_true(t *testing.T) {
63 t.Parallel()
64 client, mux, _ := setup(t)
65
66 mux.HandleFunc("/repos/o/r/assignees/u", func(_ http.ResponseWriter, r *http.Request) {
67 testMethod(t, r, "GET")
68 })
69
70 ctx := t.Context()
71 assignee, _, err := client.Issues.IsAssignee(ctx, "o", "r", "u")
72 if err != nil {
73 t.Errorf("Issues.IsAssignee returned error: %v", err)
74 }
75 if want := true; assignee != want {
76 t.Errorf("Issues.IsAssignee returned %+v, want %+v", assignee, want)
77 }
78
79 const methodName = "IsAssignee"
80 testBadOptions(t, methodName, func() (err error) {
81 _, _, err = client.Issues.IsAssignee(ctx, "\n", "\n", "\n")
82 return err
83 })
84
85 testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) {
86 got, resp, err := client.Issues.IsAssignee(ctx, "o", "r", "u")
87 if got {
88 t.Errorf("testNewRequestAndDoFailure %v = %#v, want false", methodName, got)
89 }
90 return resp, err
91 })
92}
93
94func TestIssuesService_IsAssignee_false(t *testing.T) {
95 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…