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

Function TestActivityService_Star

github/activity_star_test.go:220–243  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

218}
219
220func TestActivityService_Star(t *testing.T) {
221 t.Parallel()
222 client, mux, _ := setup(t)
223
224 mux.HandleFunc("/user/starred/o/r", func(_ http.ResponseWriter, r *http.Request) {
225 testMethod(t, r, "PUT")
226 })
227
228 ctx := t.Context()
229 _, err := client.Activity.Star(ctx, "o", "r")
230 if err != nil {
231 t.Errorf("Activity.Star returned error: %v", err)
232 }
233
234 const methodName = "Star"
235 testBadOptions(t, methodName, func() (err error) {
236 _, err = client.Activity.Star(ctx, "\n", "\n")
237 return err
238 })
239
240 testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) {
241 return client.Activity.Star(ctx, "o", "r")
242 })
243}
244
245func TestActivityService_Star_invalidID(t *testing.T) {
246 t.Parallel()

Callers

nothing calls this directly

Calls 5

testMethodFunction · 0.85
testBadOptionsFunction · 0.85
setupFunction · 0.70
StarMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…