(t *testing.T)
| 755 | } |
| 756 | |
| 757 | func 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 | |
| 782 | func TestGistsService_Star_invalidID(t *testing.T) { |
| 783 | t.Parallel() |
nothing calls this directly
no test coverage detected
searching dependent graphs…