diff options
-rw-r--r-- | api4/preference_test.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/api4/preference_test.go b/api4/preference_test.go index 4a68bc804..68d34784f 100644 --- a/api4/preference_test.go +++ b/api4/preference_test.go @@ -252,6 +252,10 @@ func TestUpdatePreferencesWebsocket(t *testing.T) { } WebSocketClient.Listen() + time.Sleep(300 * time.Millisecond) + if resp := <-WebSocketClient.ResponseChannel; resp.Status != model.STATUS_OK { + t.Fatal("should have responded OK to authentication challenge") + } userId := th.BasicUser.Id preferences := &model.Preferences{ @@ -371,6 +375,10 @@ func TestDeletePreferencesWebsocket(t *testing.T) { } WebSocketClient.Listen() + time.Sleep(300 * time.Millisecond) + if resp := <-WebSocketClient.ResponseChannel; resp.Status != model.STATUS_OK { + t.Fatal("should have responded OK to authentication challenge") + } _, resp = th.Client.DeletePreferences(userId, preferences) CheckNoError(t, resp) |