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

Function TestGistsService_Star

github/gists_test.go:757–780  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

755}
756
757func TestGistsService_Star(t *testing.T) {
758 t.Parallel()
759 client, mux, _ := setup(t)
760
761 mux.HandleFunc("/gists/1/star", func(_ http.ResponseWriter, r *http.Request) {
762 testMethod(t, r, "PUT")
763 })
764
765 ctx := t.Context()
766 _, err := client.Gists.Star(ctx, "1")
767 if err != nil {
768 t.Errorf("Gists.Star returned error: %v", err)
769 }
770
771 const methodName = "Star"
772 testBadOptions(t, methodName, func() (err error) {
773 _, err = client.Gists.Star(ctx, "\n")
774 return err
775 })
776
777 testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) {
778 return client.Gists.Star(ctx, "1")
779 })
780}
781
782func TestGistsService_Star_invalidID(t *testing.T) {
783 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…