@@ -111,7 +111,7 @@ func TestAPITeam(t *testing.T) {
111
111
112
112
// Read team.
113
113
teamRead := unittest .AssertExistsAndLoadBean (t , & organization.Team {ID : teamID })
114
- assert .NoError (t , teamRead .GetUnits ( ))
114
+ assert .NoError (t , teamRead .LoadUnits ( db . DefaultContext ))
115
115
req = NewRequestf (t , "GET" , "/api/v1/teams/%d?token=" + token , teamID )
116
116
resp = MakeRequest (t , req , http .StatusOK )
117
117
apiTeam = api.Team {}
@@ -181,7 +181,7 @@ func TestAPITeam(t *testing.T) {
181
181
resp = MakeRequest (t , req , http .StatusOK )
182
182
apiTeam = api.Team {}
183
183
DecodeJSON (t , resp , & apiTeam )
184
- assert .NoError (t , teamRead .GetUnits ( ))
184
+ assert .NoError (t , teamRead .LoadUnits ( db . DefaultContext ))
185
185
checkTeamResponse (t , "ReadTeam2" , & apiTeam , teamRead .Name , * teamToEditDesc .Description , teamRead .IncludesAllRepositories ,
186
186
teamRead .AccessMode .String (), teamRead .GetUnitNames (), teamRead .GetUnitsMap ())
187
187
@@ -210,7 +210,7 @@ func checkTeamResponse(t *testing.T, testName string, apiTeam *api.Team, name, d
210
210
211
211
func checkTeamBean (t * testing.T , id int64 , name , description string , includesAllRepositories bool , permission string , units []string , unitsMap map [string ]string ) {
212
212
team := unittest .AssertExistsAndLoadBean (t , & organization.Team {ID : id })
213
- assert .NoError (t , team .GetUnits ( ), "GetUnits " )
213
+ assert .NoError (t , team .LoadUnits ( db . DefaultContext ), "LoadUnits " )
214
214
apiTeam , err := convert .ToTeam (db .DefaultContext , team )
215
215
assert .NoError (t , err )
216
216
checkTeamResponse (t , fmt .Sprintf ("checkTeamBean/%s_%s" , name , description ), apiTeam , name , description , includesAllRepositories , permission , units , unitsMap )
0 commit comments