diff options
| author | Andrej Mihajlov <and@codeispoetry.ru> | 2017-06-21 14:11:49 +0300 |
|---|---|---|
| committer | Andrej Mihajlov <and@codeispoetry.ru> | 2017-06-21 14:11:49 +0300 |
| commit | 5ae8eda0075ec72424c478fdf1ff731db43b0ff5 (patch) | |
| tree | c642e59864520408cbe8c1f7967cf814fdee43e8 /test | |
| parent | 7950d83c2d70c72bb08415d8ecf823d85ce7bd35 (diff) | |
| parent | 00c6ccf614bc92b72262e4ac57e8d602573ffc65 (diff) | |
| download | mullvadvpn-5ae8eda0075ec72424c478fdf1ff731db43b0ff5.tar.xz mullvadvpn-5ae8eda0075ec72424c478fdf1ff731db43b0ff5.zip | |
Merge branch 'feature/flow-typed/enums-migration'
Diffstat (limited to 'test')
| -rw-r--r-- | test/actions.spec.js | 9 | ||||
| -rw-r--r-- | test/mocks/redux.js | 5 | ||||
| -rw-r--r-- | test/reducers.spec.js | 5 | ||||
| -rw-r--r-- | test/routing.spec.js | 3 |
4 files changed, 9 insertions, 13 deletions
diff --git a/test/actions.spec.js b/test/actions.spec.js index e1420e92d2..914483161e 100644 --- a/test/actions.spec.js +++ b/test/actions.spec.js @@ -7,7 +7,6 @@ import { newMockIpc } from './mocks/ipc'; import userActions from '../app/actions/user'; import connectActions from '../app/actions/connect'; import mapBackendEventsToReduxActions from '../app/lib/backend-redux-actions'; -import { LoginState, ConnectionState } from '../app/enums'; describe('actions', function() { this.timeout(10000); @@ -100,11 +99,11 @@ describe('actions', function() { user: { account: '3333234567890', paidUntil: '2038-01-01T00:00:00.000Z', - status: LoginState.ok + status: 'ok' }, connect: { serverAddress: '1.2.3.4', - status: ConnectionState.connected + status: 'connected' } }); @@ -132,11 +131,11 @@ describe('actions', function() { user: { account: '3333234567890', paidUntil: '2038-01-01T00:00:00.000Z', - status: LoginState.ok + status: 'ok' }, connect: { serverAddress: '1.2.3.4', - status: ConnectionState.connected + status: 'connected' } }); diff --git a/test/mocks/redux.js b/test/mocks/redux.js index 6855274296..0d4d73518f 100644 --- a/test/mocks/redux.js +++ b/test/mocks/redux.js @@ -1,7 +1,6 @@ import configureMockStore from 'redux-mock-store'; import thunk from 'redux-thunk'; import { defaultServer } from '../../app/config'; -import { LoginState, ConnectionState } from '../../app/enums'; // fetch is absent in node environment // this will automatically import it into global scope @@ -13,11 +12,11 @@ export const mockState = () => { return { user: { account: null, - status: LoginState.none, + status: 'none', error: null }, connect: { - status: ConnectionState.disconnected, + status: 'disconnected', serverAddress: null, clientIp: null }, diff --git a/test/reducers.spec.js b/test/reducers.spec.js index 8a5402c3e8..7a5470e930 100644 --- a/test/reducers.spec.js +++ b/test/reducers.spec.js @@ -3,7 +3,6 @@ import userReducer from '../app/reducers/user'; import connectReducer from '../app/reducers/connect'; import settingsReducer from '../app/reducers/settings'; import { defaultServer } from '../app/config'; -import { LoginState, ConnectionState } from '../app/enums'; describe('reducers', () => { @@ -12,7 +11,7 @@ describe('reducers', () => { type: 'USER_LOGIN_CHANGE', payload: { account: '1111', - status: LoginState.failed, + status: 'failed', error: new Error('Something went wrong') } }; @@ -24,7 +23,7 @@ describe('reducers', () => { const action = { type: 'CONNECTION_CHANGE', payload: { - status: ConnectionState.connected, + status: 'connected', serverAddress: '2.1.1.2', clientIp: '2.1.1.1' } diff --git a/test/routing.spec.js b/test/routing.spec.js index 2ce33e73c2..e728ca59a6 100644 --- a/test/routing.spec.js +++ b/test/routing.spec.js @@ -3,7 +3,6 @@ import { expect } from 'chai'; import { filterMinorActions, mockState, mockStore } from './mocks/redux'; import userActions from '../app/actions/user'; import mapBackendEventsToRouter from '../app/lib/backend-routing'; -import { LoginState } from '../app/enums'; import Backend from '../app/lib/backend'; import { newMockIpc } from './mocks/ipc'; @@ -18,7 +17,7 @@ describe('routing', function() { let state = Object.assign(mockState(), { user: { account: '1111234567890', - status: LoginState.ok + status: 'ok' } }); |
