WebSocket send unit test (AngularJS promise resolution)