mattermost-mobile/test/app/actions/select_server.test.js
Chris Duarte d206ea68de PLT-6173: Offline redux store (#471)
* PLT-6173: Offline redux store

* Review feedback
2017-04-09 21:51:47 -03:00

20 lines
712 B
JavaScript

// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
import assert from 'assert';
import * as Actions from 'app/actions/views/select_server';
import configureStore from 'app/store';
import TestHelper from 'test/test_helper';
describe('Actions.Views.SelectServer', () => {
it('handleServerUrlChanged', async () => {
const store = configureStore();
await TestHelper.wait();
await Actions.handleServerUrlChanged('https://mattermost.example.com')(store.dispatch, store.getState);
const serverUrl = store.getState().views.selectServer.serverUrl;
assert.equal('https://mattermost.example.com', serverUrl);
});
});