diff options
| author | Erik Larkö <erik@mullvad.net> | 2017-07-27 15:01:24 +0200 |
|---|---|---|
| committer | Erik Larkö <erik@mullvad.net> | 2017-08-08 09:50:58 +0200 |
| commit | e516d327f01dc2b0969657228257b2cac7942ad3 (patch) | |
| tree | 0aac108255a7bc2e39300d840b6a825c6cae89f3 /test | |
| parent | 3ec32f23e93c8a487da82db86516ad12782b54f6 (diff) | |
| download | mullvadvpn-e516d327f01dc2b0969657228257b2cac7942ad3.tar.xz mullvadvpn-e516d327f01dc2b0969657228257b2cac7942ad3.zip | |
Add CONNECTING action
Diffstat (limited to 'test')
| -rw-r--r-- | test/connect.spec.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/connect.spec.js b/test/connect.spec.js index 6f7069f2c0..e2e531e179 100644 --- a/test/connect.spec.js +++ b/test/connect.spec.js @@ -45,6 +45,18 @@ describe('connect', () => { }, done); }); + it('should update the state with the server address', () => { + const { store, backend } = setupBackendAndStore(); + const arbitraryString = 'www.example.com'; + + return backend.connect(arbitraryString) + .then( () => { + const state = store.getState().connection; + expect(state.status).to.equal('connecting'); + expect(state.serverAddress).to.equal(arbitraryString); + }); + }); + it('should correctly deduce \'connected\' from backend states', () => { const { store, mockIpc } = setupBackendAndStore(); |
