summaryrefslogtreecommitdiffstats
path: root/api4/preference_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'api4/preference_test.go')
-rw-r--r--api4/preference_test.go8
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)