Trigger callback even when joining an already joined room

This commit is contained in:
Damien Arrachequesne
2015-11-27 22:08:18 +01:00
parent 35a0fe0377
commit 1dfacc6647
2 changed files with 19 additions and 1 deletions

View File

@@ -1685,6 +1685,21 @@ describe('socket.io', function(){
});
});
});
it('should always trigger the callback (if provided) when joining a room', function(done){
var srv = http();
var sio = io(srv);
srv.listen(function(){
var socket = client(srv);
sio.on('connection', function(s){
s.join('a', function(){
s.join('a', done);
});
});
});
});
});
describe('messaging many', function(){