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

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