mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Expose user.Props through REST API (#7661)
This commit is contained in:
committed by
Corey Hulen
parent
9d9c737414
commit
812f566401
@@ -355,6 +355,9 @@ func TestGetUser(t *testing.T) {
|
||||
Client := th.Client
|
||||
|
||||
user := th.CreateUser()
|
||||
user.Props = map[string]string{"testpropkey": "testpropvalue"}
|
||||
|
||||
th.App.UpdateUser(user, false)
|
||||
|
||||
ruser, resp := Client.GetUser(user.Id, "")
|
||||
CheckNoError(t, resp)
|
||||
@@ -364,6 +367,9 @@ func TestGetUser(t *testing.T) {
|
||||
t.Fatal("emails did not match")
|
||||
}
|
||||
|
||||
assert.NotNil(t, ruser.Props)
|
||||
assert.Equal(t, ruser.Props["testpropkey"], "testpropvalue")
|
||||
|
||||
ruser, resp = Client.GetUser(user.Id, resp.Etag)
|
||||
CheckEtag(t, ruser, resp)
|
||||
|
||||
@@ -2447,7 +2453,7 @@ func TestRevokeUserAccessToken(t *testing.T) {
|
||||
if !ok {
|
||||
t.Fatal("should have passed")
|
||||
}
|
||||
|
||||
|
||||
oldSessionToken = Client.AuthToken
|
||||
Client.AuthToken = token.Token
|
||||
_, resp = Client.GetMe("")
|
||||
|
||||
Reference in New Issue
Block a user