(t *testing.T)
| 721 | } |
| 722 | |
| 723 | func TestGistsService_Delete(t *testing.T) { |
| 724 | t.Parallel() |
| 725 | client, mux, _ := setup(t) |
| 726 | |
| 727 | mux.HandleFunc("/gists/1", func(_ http.ResponseWriter, r *http.Request) { |
| 728 | testMethod(t, r, "DELETE") |
| 729 | }) |
| 730 | |
| 731 | ctx := t.Context() |
| 732 | _, err := client.Gists.Delete(ctx, "1") |
| 733 | if err != nil { |
| 734 | t.Errorf("Gists.Delete returned error: %v", err) |
| 735 | } |
| 736 | |
| 737 | const methodName = "Delete" |
| 738 | testBadOptions(t, methodName, func() (err error) { |
| 739 | _, err = client.Gists.Delete(ctx, "\n") |
| 740 | return err |
| 741 | }) |
| 742 | |
| 743 | testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { |
| 744 | return client.Gists.Delete(ctx, "1") |
| 745 | }) |
| 746 | } |
| 747 | |
| 748 | func TestGistsService_Delete_invalidID(t *testing.T) { |
| 749 | t.Parallel() |
nothing calls this directly
no test coverage detected
searching dependent graphs…