Tests for connecting and disconnecting a websocket.