From 8f03691e0a5f22ea99f65d2b0d30fe4d08afa2aa Mon Sep 17 00:00:00 2001 From: harryzcy Date: Tue, 1 Nov 2022 04:02:31 -0400 Subject: [PATCH] Fix TestAPIGetAll --- tests/integration/api_org_test.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/integration/api_org_test.go b/tests/integration/api_org_test.go index 67902f8550..98807af568 100644 --- a/tests/integration/api_org_test.go +++ b/tests/integration/api_org_test.go @@ -152,9 +152,10 @@ func TestAPIGetAll(t *testing.T) { var apiOrgList []*api.Organization DecodeJSON(t, resp, &apiOrgList) - assert.Len(t, apiOrgList, 7) - assert.Equal(t, "org25", apiOrgList[0].FullName) - assert.Equal(t, "public", apiOrgList[0].Visibility) + // accessing with a token will return all orgs + assert.Len(t, apiOrgList, 9) + assert.Equal(t, "org25", apiOrgList[1].FullName) + assert.Equal(t, "public", apiOrgList[1].Visibility) } func TestAPIOrgSearchEmptyTeam(t *testing.T) {