summaryrefslogtreecommitdiffstats
path: root/integrations
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2021-06-18 19:00:53 +0200
committerGitHub <noreply@github.com>2021-06-18 19:00:53 +0200
commit889dea8fc1e78b0d915b27f122df116e7296336d (patch)
treef0c6d455c84759281abd507b01a5f02f66e380c8 /integrations
parent59f25587e84e99c1c569d6149b9a3b8fb06641f2 (diff)
downloadgitea-889dea8fc1e78b0d915b27f122df116e7296336d.tar.gz
gitea-889dea8fc1e78b0d915b27f122df116e7296336d.zip
Remove User.GetOrganizations() (#14032)
as title
Diffstat (limited to 'integrations')
-rw-r--r--integrations/org_count_test.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/integrations/org_count_test.go b/integrations/org_count_test.go
index 755ee3cee5..20917dc17e 100644
--- a/integrations/org_count_test.go
+++ b/integrations/org_count_test.go
@@ -114,11 +114,12 @@ func doCheckOrgCounts(username string, orgCounts map[string]int, strict bool, ca
Name: username,
}).(*models.User)
- user.GetOrganizations(&models.SearchOrganizationsOptions{All: true})
+ orgs, err := models.GetOrgsByUserID(user.ID, true)
+ assert.NoError(t, err)
calcOrgCounts := map[string]int{}
- for _, org := range user.Orgs {
+ for _, org := range orgs {
calcOrgCounts[org.LowerName] = org.NumRepos
count, ok := canonicalCounts[org.LowerName]
if ok {