From fa254ba205bd8253178ffec50f89ad405aa969d7 Mon Sep 17 00:00:00 2001 From: Michael Hoffman Date: Sat, 28 Dec 2024 07:51:47 -0500 Subject: [PATCH] Complete get -> list renaming --- pkg/cmd/repo/autolink/list/http_test.go | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/pkg/cmd/repo/autolink/list/http_test.go b/pkg/cmd/repo/autolink/list/http_test.go index eec74cf38..fc1e44b23 100644 --- a/pkg/cmd/repo/autolink/list/http_test.go +++ b/pkg/cmd/repo/autolink/list/http_test.go @@ -11,13 +11,7 @@ import ( "github.com/stretchr/testify/require" ) -func TestNewAutolinkGetter(t *testing.T) { - httpClient := &http.Client{} - autolinkGetter := &AutolinkLister{HTTPClient: httpClient} - assert.NotNil(t, autolinkGetter) -} - -func TestAutoLinkGetter_Get(t *testing.T) { +func TestAutoLinkLister_List(t *testing.T) { tests := []struct { name string repo ghrepo.Interface @@ -65,10 +59,10 @@ func TestAutoLinkGetter_Get(t *testing.T) { ) defer reg.Verify(t) - autolinkGetter := &AutolinkLister{ + autolinkLister := &AutolinkLister{ HTTPClient: &http.Client{Transport: reg}, } - autolinks, err := autolinkGetter.List(tt.repo) + autolinks, err := autolinkLister.List(tt.repo) if tt.status == 404 { require.Error(t, err) assert.Equal(t, "error getting autolinks: HTTP 404: Perhaps you are missing admin rights to the repository? (https://api.github.com/repos/OWNER/REPO/autolinks)", err.Error())