Skip to content

Commit

Permalink
Added test for validation arguments on im.getHistory
Browse files Browse the repository at this point in the history
  • Loading branch information
philliphenslee committed Oct 23, 2015
1 parent 5be49ed commit 759f7e3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/slack/im.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,14 @@ describe('im', function () {
done();
});

it('should return an error to callback if missing required string argument', function (done) {
im.getHistory(null, function (err, result) {
expect(err).to.not.equal(null);
expect(err.message).to.equal('must supply valid argument(s)');
});
done();
});

it('should return an api response to caller', function (done) {

var scope = nock('https://slack.com')
Expand Down

0 comments on commit 759f7e3

Please sign in to comment.