summaryrefslogtreecommitdiffstats
path: root/api4/user_test.go
diff options
context:
space:
mode:
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)