blob: c18b89ffb389f81e05bc0acd7fc9fafe8bffd2db (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
import TestHelper from 'tests/helpers/client-test-helper.jsx';
describe('Client.General', function() {
test('General.getClientConfig', function(done) {
TestHelper.initBasic(done, () => {
TestHelper.basicClient().getClientConfig(
function(data) {
expect(data.SiteName).toEqual('Mattermost');
done();
},
function(err) {
done.fail(new Error(err.message));
}
);
});
});
test('General.getPing', function(done) {
TestHelper.initBasic(done, () => {
TestHelper.basicClient().getPing(
function(data) {
expect(data.version.length).toBeGreaterThan(0);
done();
},
function(err) {
done.fail(new Error(err.message));
}
);
});
});
test('General.logClientError', function(done) {
TestHelper.initBasic(done, () => {
var config = {};
config.site_name = 'test';
TestHelper.basicClient().logClientError('this is a test');
done();
});
});
});
|