Fix adding user to team and add test check (#5172)
Этот коммит содержится в:
коммит произвёл
Harrison Healey
родитель
d1f0cacdc9
Коммит
58b3c76c94
@@ -153,7 +153,7 @@ func addUserToTeam(c *Context, w http.ResponseWriter, r *http.Request) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if _, err := app.AddUserToTeam(c.TeamId, c.Session.UserId); err != nil {
|
if _, err := app.AddUserToTeam(c.TeamId, userId); err != nil {
|
||||||
c.Err = err
|
c.Err = err
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -79,6 +79,10 @@ func TestAddUserToTeam(t *testing.T) {
|
|||||||
t.Fatal("ids didn't match")
|
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) {
|
func TestRemoveUserFromTeam(t *testing.T) {
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user