This commit is contained in:
Brad Fitzpatrick 2014-09-01 16:35:51 -07:00
commit 8d7a7d9fcd
1 changed files with 9 additions and 0 deletions

View File

@ -90,6 +90,15 @@ func TestWebsocketQuery(t *testing.T) {
errc <- err
return
}
if !strings.HasPrefix(string(inMsg), `{"tag":"_status"`) {
errc <- fmt.Errorf("unexpected message type=%d msg=%q, wanted status update", inType, inMsg)
return
}
inType, inMsg, err = wc.ReadMessage()
if err != nil {
errc <- err
return
}
if strings.Contains(string(inMsg), pn.String()) {
errc <- nil
return