summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorErik Larkö <erik@mullvad.net>2017-08-07 13:30:10 +0200
committerErik Larkö <erik@mullvad.net>2017-08-07 13:30:10 +0200
commitdbd9843c12eef4828468fd9ea4500280ea5caa69 (patch)
treee2d93e9c150681522459e619bc2d7cff5e433695 /test
parent0fd8de3cdfdf8957ad3362643fcd8e8ef9888794 (diff)
parent0990f4cfbe4df6675637b97df429d2155000d7ff (diff)
downloadmullvadvpn-dbd9843c12eef4828468fd9ea4500280ea5caa69.tar.xz
mullvadvpn-dbd9843c12eef4828468fd9ea4500280ea5caa69.zip
Merge branch 'autologin-actions'
Diffstat (limited to 'test')
-rw-r--r--test/autologin.spec.js4
-rw-r--r--test/mocks/ipc.js3
2 files changed, 4 insertions, 3 deletions
diff --git a/test/autologin.spec.js b/test/autologin.spec.js
index b8d4aa8356..628dc145eb 100644
--- a/test/autologin.spec.js
+++ b/test/autologin.spec.js
@@ -59,7 +59,7 @@ describe('autologin', () => {
.then( () => {
const state = store.getState().account;
- expect(state.status).to.equal('none');
+ expect(state.status).to.equal('failed');
expect(state.accountNumber).to.be.null;
expect(state.error).not.to.be.null;
});
@@ -75,7 +75,7 @@ describe('autologin', () => {
.then( () => {
const state = store.getState().account;
- expect(state.status).to.equal('none');
+ expect(state.status).to.equal('failed');
expect(state.error).not.to.be.null;
});
});
diff --git a/test/mocks/ipc.js b/test/mocks/ipc.js
index bd99b8d680..c182d45d21 100644
--- a/test/mocks/ipc.js
+++ b/test/mocks/ipc.js
@@ -15,8 +15,9 @@ export function newMockIpc() {
const mockIpc: IpcFacade & MockIpc = {
setConnectionString: (_str: string) => {},
- getAccountData: () => {
+ getAccountData: (accountNumber) => {
return new Promise(r => r({
+ accountNumber: accountNumber,
paid_until: '',
}));
},