more tests, added ability to remove clients from a channel
This commit is contained in:
8
dist/server/test/channelBase.spec.js
vendored
8
dist/server/test/channelBase.spec.js
vendored
@ -34,5 +34,13 @@ describe('ChannelBase', function () {
|
||||
var result = channel.broadcastMessage(client, 'test message');
|
||||
expect(result.status).to.be.equal('success');
|
||||
});
|
||||
it('should be able to remove client from channel', function () {
|
||||
var result = channel.removeClient(client.id);
|
||||
expect(result).to.be.equal(true);
|
||||
});
|
||||
it('should not be able to remove client that doesnn\'t exist from channel', function () {
|
||||
var result = channel.removeClient(126);
|
||||
expect(result).to.be.equal(false);
|
||||
});
|
||||
});
|
||||
//# sourceMappingURL=channelBase.spec.js.map
|
Reference in New Issue
Block a user