From d38328976e2c8bb0fab91e656042a0d8ac37bc76 Mon Sep 17 00:00:00 2001 From: JoramWilander Date: Wed, 6 Sep 2017 16:24:34 -0400 Subject: Various patches --- api4/status_test.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'api4/status_test.go') 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) } -- cgit v1.2.3-1-g7c22