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

Function TestActivityService_Unstar

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

Source from the content-addressed store, hash-verified

252}
253
254func TestActivityService_Unstar(t *testing.T) {
255 t.Parallel()
256 client, mux, _ := setup(t)
257
258 mux.HandleFunc("/user/starred/o/r", func(_ http.ResponseWriter, r *http.Request) {
259 testMethod(t, r, "DELETE")
260 })
261
262 ctx := t.Context()
263 _, err := client.Activity.Unstar(ctx, "o", "r")
264 if err != nil {
265 t.Errorf("Activity.Unstar returned error: %v", err)
266 }
267
268 const methodName = "Unstar"
269 testBadOptions(t, methodName, func() (err error) {
270 _, err = client.Activity.Unstar(ctx, "\n", "\n")
271 return err
272 })
273
274 testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) {
275 return client.Activity.Unstar(ctx, "o", "r")
276 })
277}
278
279func TestActivityService_Unstar_invalidID(t *testing.T) {
280 t.Parallel()

Callers

nothing calls this directly

Calls 5

testMethodFunction · 0.85
testBadOptionsFunction · 0.85
setupFunction · 0.70
UnstarMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…