more tests, added ability to remove clients from a channel
This commit is contained in:
12
dist/server/test/channelManager.spec.js
vendored
12
dist/server/test/channelManager.spec.js
vendored
@ -43,5 +43,17 @@ describe('ChannelManager', function () {
|
||||
var result = channelManager.createByChannelType(data2);
|
||||
expect(result.id).to.be.equal('test channel 2');
|
||||
});
|
||||
it('should remove client from channel', function () {
|
||||
var result = channelManager.removeClientFromChannel(client.id, 'test channel');
|
||||
expect(result).to.be.equal(true);
|
||||
});
|
||||
it('should be unable to remove a client that doesn\'t exit from channel', function () {
|
||||
var result = channelManager.removeClientFromChannel(126, 'test channel');
|
||||
expect(result).to.be.equal(false);
|
||||
});
|
||||
it('should be unable to remove a client from a channel that doesn\'t exist', function () {
|
||||
var result = channelManager.removeClientFromChannel(client.id, 'test channel 3');
|
||||
expect(result).to.be.equal(false);
|
||||
});
|
||||
});
|
||||
//# sourceMappingURL=channelManager.spec.js.map
|
Reference in New Issue
Block a user