summaryrefslogtreecommitdiffstats
path: root/api4/user_test.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2017-10-04 11:04:17 -0400
committerGitHub <noreply@github.com>2017-10-04 11:04:17 -0400
commitaffd35071ea155069979fd359726296de8aa6aaf (patch)
treed6810c7a9356ceb3ff5bbb293f1b8756906d1d45 /api4/user_test.go
parent3e144f82e29e566b3cf1615c19b4ddc6dc7e4694 (diff)
downloadchat-affd35071ea155069979fd359726296de8aa6aaf.tar.gz
chat-affd35071ea155069979fd359726296de8aa6aaf.tar.bz2
chat-affd35071ea155069979fd359726296de8aa6aaf.zip
Updates to session revoking in v4 (#7565)
Diffstat (limited to 'api4/user_test.go')
-rw-r--r--api4/user_test.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/api4/user_test.go b/api4/user_test.go
index b2d6d14dd..12a323137 100644
--- a/api4/user_test.go
+++ b/api4/user_test.go
@@ -1890,6 +1890,14 @@ func TestRevokeSessions(t *testing.T) {
}
CheckNoError(t, resp)
+ th.LoginBasic()
+
+ sessions, _ = th.App.GetSessions(th.SystemAdminUser.Id)
+ session = sessions[0]
+
+ _, resp = Client.RevokeSession(user.Id, session.Id)
+ CheckBadRequestStatus(t, resp)
+
Client.Logout()
_, resp = Client.RevokeSession(user.Id, model.NewId())
CheckUnauthorizedStatus(t, resp)