diff options
author | Carlos Tadeu Panato Junior <ctadeu@gmail.com> | 2016-12-12 06:30:37 +0100 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2016-12-11 21:30:37 -0800 |
commit | f0d71d87899967335210b9130a7e2b8d180bef46 (patch) | |
tree | d2941b8870e87677a84821dd32454a28594c889b /webapp/tests | |
parent | b5fcfd608c0e9ef764cace7328653e4d4c47a061 (diff) | |
download | chat-f0d71d87899967335210b9130a7e2b8d180bef46.tar.gz chat-f0d71d87899967335210b9130a7e2b8d180bef46.tar.bz2 chat-f0d71d87899967335210b9130a7e2b8d180bef46.zip |
Add API call to get a channel by its name (#4700)
* add api for getByChannelName
* add tests
* fix test
* rename and tests
* check for permissions and test
Diffstat (limited to 'webapp/tests')
-rw-r--r-- | webapp/tests/client_channel.test.jsx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/webapp/tests/client_channel.test.jsx b/webapp/tests/client_channel.test.jsx index e8466021f..08c821f3c 100644 --- a/webapp/tests/client_channel.test.jsx +++ b/webapp/tests/client_channel.test.jsx @@ -426,5 +426,20 @@ describe('Client.Channels', function() { ); }); }); + + it('getChannelByName', function(done) { + TestHelper.initBasic(() => { + TestHelper.basicClient().getChannelByName( + TestHelper.basicChannel().name, + function(data) { + assert.equal(data.name, TestHelper.basicChannel().name); + done(); + }, + function(err) { + done(new Error(err.message)); + } + ); + }); + }); }); |