Fix adding user to team and add test check (#5172)

This commit is contained in:
Joram Wilander
2017-01-23 13:43:07 -05:00
committed by Harrison Healey
parent d1f0cacdc9
commit 58b3c76c94
2 changed files with 5 additions and 1 deletions

View File

@@ -153,7 +153,7 @@ func addUserToTeam(c *Context, w http.ResponseWriter, r *http.Request) {
return
}
if _, err := app.AddUserToTeam(c.TeamId, c.Session.UserId); err != nil {
if _, err := app.AddUserToTeam(c.TeamId, userId); err != nil {
c.Err = err
return
}

View File

@@ -79,6 +79,10 @@ func TestAddUserToTeam(t *testing.T) {
t.Fatal("ids didn't match")
}
}
if _, err := th.BasicClient.GetTeamMember(th.BasicTeam.Id, user2.Id); err != nil {
t.Fatal(err)
}
}
func TestRemoveUserFromTeam(t *testing.T) {