* Moved SelectServer view state into store * Moved view state for Login to stores * Renamed RequestStatus values * Merged duplicated view state for login * initial redux store * Fix eslint * user store and force logout when necessary * channel store * address feedback * Revert naming the property of data
21 lines
707 B
JavaScript
21 lines
707 B
JavaScript
// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved.
|
|
// See License.txt for license information.
|
|
|
|
import assert from 'assert';
|
|
|
|
import * as Actions from 'actions/views/select_server';
|
|
import configureStore from 'store/configureStore';
|
|
|
|
describe('Actions.Views.SelectServer', () => {
|
|
it('handleServerUrlChanged', (done) => {
|
|
const store = configureStore();
|
|
|
|
store.subscribe(() => {
|
|
const serverUrl = store.getState().views.selectServer.serverUrl;
|
|
assert.equal('https://mattermost.example.com', serverUrl);
|
|
done();
|
|
});
|
|
|
|
Actions.handleServerUrlChanged('https://mattermost.example.com')(store.dispatch, store.getState);
|
|
});
|
|
});
|