From 8fbd57c8f21df989a86c59509ea26056cde53220 Mon Sep 17 00:00:00 2001 From: Vladimir Metnev Date: Sat, 4 Nov 2017 13:00:38 +0200 Subject: [PATCH] fix(reducers/links): fix tests (payload should be array) fix(reducers/links): fix tests (payload should be array) --- src/common/reducers/links/index.test.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/reducers/links/index.test.js b/src/common/reducers/links/index.test.js index 83c858b7..bfc50f41 100644 --- a/src/common/reducers/links/index.test.js +++ b/src/common/reducers/links/index.test.js @@ -11,9 +11,7 @@ describe('LINKS REDUCER', () => { }) it('should handle GET_LINKS_SUCCESS', () => { - const payload = { - item: 'payload' - } + const payload = [{item: 'payload'}] const success = { type: GET_LINKS_SUCCESS, @@ -21,6 +19,7 @@ describe('LINKS REDUCER', () => { } expect(reducer(initialState, success)).toEqual({ ...initialState, + count: 1, entities: payload, isLoaded: true, isLoading: false @@ -38,6 +37,7 @@ describe('LINKS REDUCER', () => { } expect(reducer(initialState, fail)).toEqual({ ...initialState, + count: 0, errors: { hmm: 'thatsanerror' },