more tests, added ability to remove clients from a channel

This commit is contained in:
Josh Burman
2019-03-14 14:17:08 -04:00
parent 21f77fa4c3
commit 40691d9815
17 changed files with 316 additions and 5 deletions

View File

@ -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