From f0d71d87899967335210b9130a7e2b8d180bef46 Mon Sep 17 00:00:00 2001 From: Carlos Tadeu Panato Junior Date: Mon, 12 Dec 2016 06:30:37 +0100 Subject: 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 --- webapp/tests/client_channel.test.jsx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'webapp/tests') 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)); + } + ); + }); + }); }); -- cgit v1.2.3-1-g7c22