diff --git a/pkg/cmd/gist/delete/delete_test.go b/pkg/cmd/gist/delete/delete_test.go index 97a7e11d3..fa311b07e 100644 --- a/pkg/cmd/gist/delete/delete_test.go +++ b/pkg/cmd/gist/delete/delete_test.go @@ -214,7 +214,7 @@ func Test_deleteRun(t *testing.T) { wantErr: true, }, { - name: "not found", + name: "not owned by you", opts: &DeleteOptions{ Selector: "1234", }, @@ -227,6 +227,19 @@ func Test_deleteRun(t *testing.T) { wantErr: true, wantStderr: "unable to delete gist \"cool.txt\": either the gist is not found or it is not owned by you", }, + { + name: "not found", + opts: &DeleteOptions{ + Selector: "1234", + }, + httpStubs: func(reg *httpmock.Registry) { + reg.Register(httpmock.REST("GET", "gists/1234"), + httpmock.StatusStringResponse(404, "{}")) + }, + noGists: true, + wantErr: true, + wantStderr: "not found", + }, { name: "no gists", opts: &DeleteOptions{