summaryrefslogtreecommitdiffstats
path: root/api4/status_test.go
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2017-09-06 20:43:18 -0700
committerChristopher Speller <crspeller@gmail.com>2017-09-06 20:43:18 -0700
commit77709ccdda86408d5135b8bc71462e2111992358 (patch)
tree5efc1631eb6cb31f8768fafeb58612557d98cb59 /api4/status_test.go
parentfd86a2490ea81eba8e12dcce76455710f182f81c (diff)
parente589accdaf38bb82cb5d3b5dd84eadf9bfb58b5c (diff)
downloadchat-77709ccdda86408d5135b8bc71462e2111992358.tar.gz
chat-77709ccdda86408d5135b8bc71462e2111992358.tar.bz2
chat-77709ccdda86408d5135b8bc71462e2111992358.zip
Merge release-4.2
Diffstat (limited to 'api4/status_test.go')
-rw-r--r--api4/status_test.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/api4/status_test.go b/api4/status_test.go
index 6d9b6c98e..cfc9a0786 100644
--- a/api4/status_test.go
+++ b/api4/status_test.go
@@ -46,6 +46,10 @@ func TestGetUserStatus(t *testing.T) {
}
Client.Logout()
+
+ _, resp = Client.GetUserStatus(th.BasicUser2.Id, "")
+ CheckUnauthorizedStatus(t, resp)
+
th.LoginBasic2()
userStatus, resp = Client.GetUserStatus(th.BasicUser2.Id, "")
CheckNoError(t, resp)
@@ -88,6 +92,11 @@ func TestGetUsersStatusesByIds(t *testing.T) {
t.Fatal("Status should be offline")
}
}
+
+ Client.Logout()
+
+ _, resp = Client.GetUsersStatusesByIds(usersIds)
+ CheckUnauthorizedStatus(t, resp)
}
func TestUpdateUserStatus(t *testing.T) {
@@ -125,4 +134,9 @@ func TestUpdateUserStatus(t *testing.T) {
if updateUserStatus.Status != "online" {
t.Fatal("Should return online status")
}
+
+ Client.Logout()
+
+ _, resp = Client.UpdateUserStatus(th.BasicUser2.Id, toUpdateUserStatus)
+ CheckUnauthorizedStatus(t, resp)
}