summaryrefslogtreecommitdiffstats
path: root/webapp/tests/client_websocket.test.jsx
blob: 6535610e3832f0b506ca3c7bc165da96fa7dbfaa (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
45
46
47
48
49
// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
/*
var assert = require('assert');
import TestHelper from './test_helper.jsx';

describe('Client.WebSocket', function() {
    this.timeout(10000);

    it('WebSocket.getStatusesByIds', function(done) {
        TestHelper.initBasic(() => {
            TestHelper.basicWebSocketClient().getStatusesByIds(
                [TestHelper.basicUser().id],
                function(resp) {
                    TestHelper.basicWebSocketClient().close();
                    assert.equal(resp.data[TestHelper.basicUser().id], 'online');
                    done();
                }
            );
        }, true);
    });

    it('WebSocket.getStatuses', function(done) {
        TestHelper.initBasic(() => {
            TestHelper.basicWebSocketClient().getStatuses(
                function(resp) {
                    TestHelper.basicWebSocketClient().close();
                    assert.equal(resp.data != null, true);
                    done();
                }
            );
        }, true);
    });

    it('WebSocket.userTyping', function(done) {
        TestHelper.initBasic(() => {
            TestHelper.basicWebSocketClient().userTyping(
                TestHelper.basicChannel().id,
                '',
                function(resp) {
                    TestHelper.basicWebSocketClient().close();
                    assert.equal(resp.status, 'OK');
                    done();
                }
            );
        }, true);
    });
});*/