diff options
author | Christopher Speller <crspeller@gmail.com> | 2017-09-06 20:43:18 -0700 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2017-09-06 20:43:18 -0700 |
commit | 77709ccdda86408d5135b8bc71462e2111992358 (patch) | |
tree | 5efc1631eb6cb31f8768fafeb58612557d98cb59 /api4/status_test.go | |
parent | fd86a2490ea81eba8e12dcce76455710f182f81c (diff) | |
parent | e589accdaf38bb82cb5d3b5dd84eadf9bfb58b5c (diff) | |
download | chat-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.go | 14 |
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) } |