@@ -111,7 +111,7 @@ func TestAPITeam(t *testing.T) {
111111
112112 // Read team.
113113 teamRead := unittest .AssertExistsAndLoadBean (t , & organization.Team {ID : teamID })
114- assert .NoError (t , teamRead .GetUnits ( ))
114+ assert .NoError (t , teamRead .LoadUnits ( db . DefaultContext ))
115115 req = NewRequestf (t , "GET" , "/api/v1/teams/%d?token=" + token , teamID )
116116 resp = MakeRequest (t , req , http .StatusOK )
117117 apiTeam = api.Team {}
@@ -181,7 +181,7 @@ func TestAPITeam(t *testing.T) {
181181 resp = MakeRequest (t , req , http .StatusOK )
182182 apiTeam = api.Team {}
183183 DecodeJSON (t , resp , & apiTeam )
184- assert .NoError (t , teamRead .GetUnits ( ))
184+ assert .NoError (t , teamRead .LoadUnits ( db . DefaultContext ))
185185 checkTeamResponse (t , "ReadTeam2" , & apiTeam , teamRead .Name , * teamToEditDesc .Description , teamRead .IncludesAllRepositories ,
186186 teamRead .AccessMode .String (), teamRead .GetUnitNames (), teamRead .GetUnitsMap ())
187187
@@ -210,7 +210,7 @@ func checkTeamResponse(t *testing.T, testName string, apiTeam *api.Team, name, d
210210
211211func checkTeamBean (t * testing.T , id int64 , name , description string , includesAllRepositories bool , permission string , units []string , unitsMap map [string ]string ) {
212212 team := unittest .AssertExistsAndLoadBean (t , & organization.Team {ID : id })
213- assert .NoError (t , team .GetUnits ( ), "GetUnits " )
213+ assert .NoError (t , team .LoadUnits ( db . DefaultContext ), "LoadUnits " )
214214 apiTeam , err := convert .ToTeam (db .DefaultContext , team )
215215 assert .NoError (t , err )
216216 checkTeamResponse (t , fmt .Sprintf ("checkTeamBean/%s_%s" , name , description ), apiTeam , name , description , includesAllRepositories , permission , units , unitsMap )
0 commit comments