Skip to content

Commit

Permalink
Add tests for not-in-channel vs channel-not-in-mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
Throne3d committed Mar 26, 2017
1 parent 9b4cfa2 commit 5c8c57f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/bot.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,24 @@ describe('Bot', function () {
});

it('should not send messages to discord if the channel isn\'t in the channel mapping',
function () {
this.bot.sendToDiscord('user', '#no-irc', 'message');
this.sendMessageStub.should.not.have.been.called;
});

it('should not send messages to discord if it isn\'t in the channel',
function () {
this.bot.sendToDiscord('user', '#otherirc', 'message');
this.sendMessageStub.should.not.have.been.called;
});

it('should not send special messages to discord if the channel isn\'t in the channel mapping',
function () {
this.bot.sendSpecialToDiscord('#no-irc', 'message');
this.sendMessageStub.should.not.have.been.called;
});

it('should not send special messages to discord if it isn\'t in the channel',
function () {
this.bot.sendSpecialToDiscord('#otherirc', 'message');
this.sendMessageStub.should.not.have.been.called;
Expand Down

0 comments on commit 5c8c57f

Please sign in to comment.