summaryrefslogtreecommitdiffstats
path: root/api4/user_test.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2017-10-20 20:26:45 -0400
committerCorey Hulen <corey@hulen.com>2017-10-20 17:26:45 -0700
commit812f5664016deb596281d8119321833beafd4599 (patch)
tree67c9e06244bcf6b3c327999427d685ee56a6afcf /api4/user_test.go
parent9d9c73741477632fc5222a0a27d28c14d43b3fbd (diff)
downloadchat-812f5664016deb596281d8119321833beafd4599.tar.gz
chat-812f5664016deb596281d8119321833beafd4599.tar.bz2
chat-812f5664016deb596281d8119321833beafd4599.zip
Expose user.Props through REST API (#7661)
Diffstat (limited to 'api4/user_test.go')
-rw-r--r--api4/user_test.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/api4/user_test.go b/api4/user_test.go
index 1f408048e..59057f347 100644
--- a/api4/user_test.go
+++ b/api4/user_test.go
@@ -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("")