summaryrefslogtreecommitdiffhomepage
path: root/test/components
diff options
context:
space:
mode:
authorErik Larkö <erik@mullvad.net>2017-08-28 07:25:44 +0200
committerErik Larkö <erik@mullvad.net>2017-08-28 07:25:44 +0200
commited1c99e5124635a83e94f976e38da2a89116904d (patch)
tree5f61668061d80ef252d6da4d335e2f80701b9d72 /test/components
parentdc3fdd74ee240227a23a5fd4e7ce45b17cfe7cbb (diff)
parent4790f001d1402ffd46cf0c333a058e96a4c84d71 (diff)
downloadmullvadvpn-ed1c99e5124635a83e94f976e38da2a89116904d.tar.xz
mullvadvpn-ed1c99e5124635a83e94f976e38da2a89116904d.zip
Merge branch 'connect-tests-2'
Diffstat (limited to 'test/components')
-rw-r--r--test/components/Connect.spec.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/components/Connect.spec.js b/test/components/Connect.spec.js
index d7a20daf2d..1f98ac87a2 100644
--- a/test/components/Connect.spec.js
+++ b/test/components/Connect.spec.js
@@ -20,6 +20,17 @@ describe('components/Connect', () => {
expect(securityMessage.text().toLowerCase()).to.contain('unsecured');
expect(connectButton.text()).to.equal('Secure my connection');
});
+
+ it('invokes the onConnect prop', (done) => {
+ const props = Object.assign({}, defaultProps, {
+ onConnect: done,
+ });
+
+ const component = mount( <Connect {...props} /> );
+ const connectButton = component.find('.button .button--positive');
+
+ connectButton.simulate('click');
+ });
});
const noop = () => {};