UNPKG

@slack/client

Version:

A library for creating a Slack client

43 lines (35 loc) 968 B
// Generated by CoffeeScript 1.10.0 (function() { var Client, client, should; should = require('should'); Client = require('../src/client'); client = null; beforeEach(function() { return client = new Client; }); describe('Client', function() { return describe('#getChannelByName', function() { beforeEach(function() { return client.channels = { chan1: { name: "achan" }, chan2: { name: "bchan" } }; }); it('should return a named channel', function() { var chan; chan = client.getChannelByName('achan'); return chan.name.should.equal('achan'); }); return it('should strip hashes from the channel name', function() { var chan; chan = client.getChannelByName('#bchan'); return chan.name.should.equal('bchan'); }); }); }); }).call(this); //# sourceMappingURL=client.js.map