diff options
author | JoramWilander <jwawilander@gmail.com> | 2017-09-06 16:24:34 -0400 |
---|---|---|
committer | JoramWilander <jwawilander@gmail.com> | 2017-09-06 16:24:34 -0400 |
commit | d38328976e2c8bb0fab91e656042a0d8ac37bc76 (patch) | |
tree | 7e3d1a96a007accfcea499857541f96890846122 /api4/status_test.go | |
parent | f968c56890bd84295672ee0d46cc846cac2dbd47 (diff) | |
download | chat-d38328976e2c8bb0fab91e656042a0d8ac37bc76.tar.gz chat-d38328976e2c8bb0fab91e656042a0d8ac37bc76.tar.bz2 chat-d38328976e2c8bb0fab91e656042a0d8ac37bc76.zip |
Various patches
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 c8277b3de..27e1fa53f 100644 --- a/api4/status_test.go +++ b/api4/status_test.go @@ -47,6 +47,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) @@ -89,6 +93,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) { @@ -126,4 +135,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) } |