summaryrefslogtreecommitdiffstats
path: root/api/user_test.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2016-10-31 08:59:23 -0400
committerChristopher Speller <crspeller@gmail.com>2016-10-31 08:59:23 -0400
commit316b155a42a4d00fb835438ce7e0401a64e59add (patch)
tree6a64f05e948323ae7595971608d84a4420a08290 /api/user_test.go
parentef363fd88ebb731dbb0470ad7cb5f50de0f3845c (diff)
downloadchat-316b155a42a4d00fb835438ce7e0401a64e59add.tar.gz
chat-316b155a42a4d00fb835438ce7e0401a64e59add.tar.bz2
chat-316b155a42a4d00fb835438ce7e0401a64e59add.zip
PLT-3562 Switch websocket over to post-connect authentication (#4327)
* Switch websocket over to post-connect authentication * Add ability to specify token in websocket js driver, add unit tests * Temporarily disable client websocket tests until issues are resolved * Minor refactoring and fix status test * Add isAuthenticated method to WebConn and minor status updates
Diffstat (limited to 'api/user_test.go')
-rw-r--r--api/user_test.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/api/user_test.go b/api/user_test.go
index 57f4729da..20c555931 100644
--- a/api/user_test.go
+++ b/api/user_test.go
@@ -1794,6 +1794,11 @@ func TestUserTyping(t *testing.T) {
defer WebSocketClient.Close()
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")
+ }
+
WebSocketClient.UserTyping("", "")
time.Sleep(300 * time.Millisecond)
if resp := <-WebSocketClient.ResponseChannel; resp.Error.Id != "api.websocket_handler.invalid_param.app_error" {