Fix test.
authorAlexandre Segura <mex.zktk@gmail.com>
Thu, 01 Jun 2017 11:39:20 +0200
changeset 13 d6eef0e9f7e1
parent 12 48ddaa42b810
child 14 df6780e48eb5
Fix test.
client/src/actions/__tests__/notesActions.test.js
--- a/client/src/actions/__tests__/notesActions.test.js	Wed May 31 17:51:54 2017 +0200
+++ b/client/src/actions/__tests__/notesActions.test.js	Thu Jun 01 11:39:20 2017 +0200
@@ -7,16 +7,18 @@
 
   it('should create an action to add a note', () => {
     const text = 'test note'
+    const session = { id: 'abcd123' }
     const expectedAction = {
       type: types.ADD_NOTE,
       note: {
-          id: expect.stringMatching(/[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}/),
-          text: text
+        id: expect.stringMatching(/[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}/),
+        session: session.id,
+        text: text
       }
     }
 
-    const receivedAction = actions.addNote(text);
+    const receivedAction = actions.addNote(session, text);
     expect(receivedAction).toMatchObject(expectedAction);
 
   })
-})
\ No newline at end of file
+})