Skip to content

Commit

Permalink
Fix adding user to team and add test check (#5172)
Browse files Browse the repository at this point in the history
  • Loading branch information
jwilander authored and hmhealey committed Jan 23, 2017
1 parent d1f0cac commit 58b3c76
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion api/team.go
Expand Up @@ -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
}
Expand Down
4 changes: 4 additions & 0 deletions api/team_test.go
Expand Up @@ -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) {
Expand Down

0 comments on commit 58b3c76

Please sign in to comment.