summaryrefslogtreecommitdiffhomepage
path: root/test/actions
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@codeispoetry.ru>2017-02-06 10:38:18 +0000
committerAndrej Mihajlov <and@codeispoetry.ru>2017-02-06 10:38:18 +0000
commitcc4362f9f0edb702ed85820addaf13d7ee758423 (patch)
tree6938111907ec73cdc41130876fb1f6b40cf619a9 /test/actions
downloadmullvadvpn-cc4362f9f0edb702ed85820addaf13d7ee758423.tar.xz
mullvadvpn-cc4362f9f0edb702ed85820addaf13d7ee758423.zip
Initial commit
Diffstat (limited to 'test/actions')
-rw-r--r--test/actions/user.spec.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/actions/user.spec.js b/test/actions/user.spec.js
new file mode 100644
index 0000000000..c5773efb77
--- /dev/null
+++ b/test/actions/user.spec.js
@@ -0,0 +1,21 @@
+import { expect } from 'chai';
+import actions from '../../app/actions/user';
+
+describe('actions', () => {
+
+ describe('user', () => {
+
+ it('should log in', () => {
+ const action = {
+ type: 'USER_LOGIN',
+ payload: {
+ username: 'John Doe',
+ loggedIn: true
+ }
+ };
+ const payload = Object.assign({}, action.payload);
+ expect(actions.login(payload)).to.deep.equal(action);
+ });
+
+ });
+});