mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Fix adding user to team and add test check (#5172)
This commit is contained in:
committed by
Harrison Healey
parent
d1f0cacdc9
commit
58b3c76c94
@@ -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
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user