diff options
| author | Thomas Haddad | 2017-05-22 17:20:53 +0200 |
|---|---|---|
| committer | Thomas Haddad | 2017-05-22 17:21:42 +0200 |
| commit | b8b9af8b1f7cd29d8974607a946120f379aaf79a (patch) | |
| tree | e2612638a5d8db3c9889d84e198d500e3188780b /spec/javascripts | |
| parent | a8076c2632bc519cf524e668bf74ca6d7859b0d9 (diff) | |
| download | chouette-core-b8b9af8b1f7cd29d8974607a946120f379aaf79a.tar.bz2 | |
Refs 3448: fix daytypes only applied to days within periods
Signed-off-by: Thomas Shawarma Haddad <thomas.haddad@af83.com>
Diffstat (limited to 'spec/javascripts')
| -rw-r--r-- | spec/javascripts/time_table/actions_spec.js | 5 | ||||
| -rw-r--r-- | spec/javascripts/time_table/reducers/metas_spec.js | 4 |
2 files changed, 5 insertions, 4 deletions
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'}})) }) |
