diff options
author | Ethan Koenig <etk39@cornell.edu> | 2017-02-24 01:25:09 -0500 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2017-02-24 14:25:09 +0800 |
commit | 76057105ca73b9354bec01be3e7b5039de80c1e0 (patch) | |
tree | 16dfaa80ad92209ee145b1c8f9c5549d337ee18e /models/org_team_test.go | |
parent | f1ab906c510d789e2b42745a3ccdbba7e2c7ec70 (diff) | |
download | gitea-76057105ca73b9354bec01be3e7b5039de80c1e0.tar.gz gitea-76057105ca73b9354bec01be3e7b5039de80c1e0.zip |
Remove unnecessary loads in org_team (#1035)
Diffstat (limited to 'models/org_team_test.go')
-rw-r--r-- | models/org_team_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/models/org_team_test.go b/models/org_team_test.go index 39a37489e8..db0a814684 100644 --- a/models/org_team_test.go +++ b/models/org_team_test.go @@ -298,7 +298,7 @@ func TestAddTeamMember(t *testing.T) { test := func(teamID, userID int64) { team := AssertExistsAndLoadBean(t, &Team{ID: teamID}).(*Team) - assert.NoError(t, AddTeamMember(team.OrgID, team.ID, userID)) + assert.NoError(t, AddTeamMember(team, userID)) AssertExistsAndLoadBean(t, &TeamUser{UID: userID, TeamID: teamID}) CheckConsistencyFor(t, &Team{ID: teamID}, &User{ID: team.OrgID}) } @@ -312,7 +312,7 @@ func TestRemoveTeamMember(t *testing.T) { testSuccess := func(teamID, userID int64) { team := AssertExistsAndLoadBean(t, &Team{ID: teamID}).(*Team) - assert.NoError(t, RemoveTeamMember(team.OrgID, team.ID, userID)) + assert.NoError(t, RemoveTeamMember(team, userID)) AssertNotExistsBean(t, &TeamUser{UID: userID, TeamID: teamID}) CheckConsistencyFor(t, &Team{ID: teamID}) } @@ -322,7 +322,7 @@ func TestRemoveTeamMember(t *testing.T) { testSuccess(3, NonexistentID) team := AssertExistsAndLoadBean(t, &Team{ID: 1}).(*Team) - err := RemoveTeamMember(team.OrgID, team.ID, 2) + err := RemoveTeamMember(team, 2) assert.True(t, IsErrLastOrgOwner(err)) } |