diff options
| author | Erik Larkö <erik@mullvad.net> | 2017-05-19 02:05:03 +0200 |
|---|---|---|
| committer | Erik Larkö <erik@mullvad.net> | 2017-05-19 06:05:44 +0200 |
| commit | 57e718385501b4a42a29633889ba6740b5ce5064 (patch) | |
| tree | 3965d54e89441768c4deb87f059e7d8e462f1343 /test | |
| parent | 61df91314a930ffa62e8eecdbea0812c327f40aa (diff) | |
| download | mullvadvpn-57e718385501b4a42a29633889ba6740b5ce5064.tar.xz mullvadvpn-57e718385501b4a42a29633889ba6740b5ce5064.zip | |
Update the tests to use the new API
Diffstat (limited to 'test')
| -rw-r--r-- | test/actions.spec.js | 4 | ||||
| -rw-r--r-- | test/mocks/backend.js | 16 |
2 files changed, 10 insertions, 10 deletions
diff --git a/test/actions.spec.js b/test/actions.spec.js index f91a99a1bf..8097de7721 100644 --- a/test/actions.spec.js +++ b/test/actions.spec.js @@ -18,7 +18,7 @@ describe('actions', function() { const backend = mockBackend({ users: { 1: { - paidUntil: '2013-01-01T00:00:00.000Z', + paid_until: '2013-01-01T00:00:00.000Z', }} }); mapBackendEventsToReduxActions(backend, store); @@ -61,7 +61,7 @@ describe('actions', function() { const backend = mockBackend({ users: { '1': { - paidUntil: '2038-01-01T00:00:00.000Z', + paid_until: '2038-01-01T00:00:00.000Z', status: LoginState.ok } }}); diff --git a/test/mocks/backend.js b/test/mocks/backend.js index 3011c8e26b..f665df8ee7 100644 --- a/test/mocks/backend.js +++ b/test/mocks/backend.js @@ -40,18 +40,18 @@ const mockIpc = (backendData) => { return new Promise((resolve, reject) => { switch (action) { - case 'login': - return resolve(backendData.users[data.accountNumber]); - case 'logout': - case 'cancelConnection': + case 'get_account_data': { + const accountNumber = data; + return resolve(backendData.users[accountNumber]); + } + case 'set_account': + case 'set_country': case 'connect': case 'disconnect': return resolve(); - case 'getLocation': - return resolve({}); - case 'getConnectionInfo': - return resolve({}); + case 'event_subscribe': + return resolve(); } reject('Unknown action: ' + action); |
