From b8b9af8b1f7cd29d8974607a946120f379aaf79a Mon Sep 17 00:00:00 2001 From: Thomas Haddad Date: Mon, 22 May 2017 17:20:53 +0200 Subject: Refs 3448: fix daytypes only applied to days within periods Signed-off-by: Thomas Shawarma Haddad --- spec/javascripts/time_table/actions_spec.js | 5 +++-- spec/javascripts/time_table/reducers/metas_spec.js | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'spec/javascripts/time_table') diff --git a/spec/javascripts/time_table/actions_spec.js b/spec/javascripts/time_table/actions_spec.js index a8abd8f90..ebd1bb04c 100644 --- a/spec/javascripts/time_table/actions_spec.js +++ b/spec/javascripts/time_table/actions_spec.js @@ -13,11 +13,12 @@ const day = { } describe('actions', () => { it('should create an action to update dayTypes', () => { + let obj = {} const expectedAction = { type: 'UPDATE_DAY_TYPES', - index: 1 + dayTypes: obj } - expect(actions.updateDayTypes(1)).toEqual(expectedAction) + expect(actions.updateDayTypes(obj)).toEqual(expectedAction) }) it('should create an action to update comment', () => { diff --git a/spec/javascripts/time_table/reducers/metas_spec.js b/spec/javascripts/time_table/reducers/metas_spec.js index 61e3048db..79dbe1ea3 100644 --- a/spec/javascripts/time_table/reducers/metas_spec.js +++ b/spec/javascripts/time_table/reducers/metas_spec.js @@ -24,11 +24,11 @@ describe('metas reducer', () => { }) it('should handle UPDATE_DAY_TYPES', () => { - const arr = [false, true, true, true, true, true, true] + const arr = [false, false, true, true, true, true, true] expect( metasReducer(state, { type: 'UPDATE_DAY_TYPES', - index: 0 + dayTypes: arr }) ).toEqual(Object.assign({}, state, {day_types: arr, calendar: {name: 'Aucun'}})) }) -- cgit v1.2.3