(t *testing.T)
| 789 | } |
| 790 | |
| 791 | func TestGistsService_Unstar(t *testing.T) { |
| 792 | t.Parallel() |
| 793 | client, mux, _ := setup(t) |
| 794 | |
| 795 | mux.HandleFunc("/gists/1/star", func(_ http.ResponseWriter, r *http.Request) { |
| 796 | testMethod(t, r, "DELETE") |
| 797 | }) |
| 798 | |
| 799 | ctx := t.Context() |
| 800 | _, err := client.Gists.Unstar(ctx, "1") |
| 801 | if err != nil { |
| 802 | t.Errorf("Gists.Unstar returned error: %v", err) |
| 803 | } |
| 804 | |
| 805 | const methodName = "Unstar" |
| 806 | testBadOptions(t, methodName, func() (err error) { |
| 807 | _, err = client.Gists.Unstar(ctx, "\n") |
| 808 | return err |
| 809 | }) |
| 810 | |
| 811 | testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { |
| 812 | return client.Gists.Unstar(ctx, "1") |
| 813 | }) |
| 814 | } |
| 815 | |
| 816 | func TestGistsService_Unstar_invalidID(t *testing.T) { |
| 817 | t.Parallel() |
nothing calls this directly
no test coverage detected
searching dependent graphs…