mattermost-mobile/test/client/client_channel.test.js
Harrison Healey 543ccb8fe6 Switched client.js to fully use Promises (#23)
* Made sanity tests run without an internet connection

* Removed onRequest parameter from Client methods

* Switched client.js to fully use Promises

* Fix mock response for login

* Fixed test_helper.js to actually use the configured url
2016-10-18 10:46:30 -04:00

19 lines
648 B
JavaScript

// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
import assert from 'assert';
import TestHelper from 'test_helper.js';
describe('Client.Channel', () => {
it('createChannel', async () => {
const {client, team} = await TestHelper.initBasic();
const channel = TestHelper.fakeChannel(team.id);
const rchannel = await client.createChannel(channel);
assert.ok(rchannel.id, 'id is empty');
assert.equal(rchannel.name, channel.name, 'name doesn\'t match');
assert.equal(rchannel.team_id, channel.team_id, 'team id doesn\'t match');
});
});