diff options
| author | Xinhui | 2017-03-03 17:50:58 +0100 |
|---|---|---|
| committer | Xinhui | 2017-03-03 17:50:58 +0100 |
| commit | bd1458253c7956dd4a07dd3017e6cbb5004c56f1 (patch) | |
| tree | f70e2152f19b8dd418cef3a9cde6bebd06f4d0c0 /spec/javascripts | |
| parent | dd6c19075007302c1ccf33a3e94a98162c721d62 (diff) | |
| parent | b74d373bc477fd60b083fa9a5b79b346cd9d07de (diff) | |
| download | chouette-core-bd1458253c7956dd4a07dd3017e6cbb5004c56f1.tar.bz2 | |
Merge branch 'master' into staging
Diffstat (limited to 'spec/javascripts')
| -rw-r--r-- | spec/javascripts/journey_patterns/reducers/journey_patterns_spec.js | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/spec/javascripts/journey_patterns/reducers/journey_patterns_spec.js b/spec/javascripts/journey_patterns/reducers/journey_patterns_spec.js index 422c97fee..df288e530 100644 --- a/spec/javascripts/journey_patterns/reducers/journey_patterns_spec.js +++ b/spec/javascripts/journey_patterns/reducers/journey_patterns_spec.js @@ -6,7 +6,6 @@ let fakeStopPoints = [{ id : 45289, name : "Clichy Levallois", object_id : "FR:92044:LDA:72073:STIF", - object_version : 1, position : 0, },{ area_type : "lda", @@ -14,9 +13,29 @@ let fakeStopPoints = [{ id : 40534, name : "Thomas LemaƮtre", object_id : "FR:92050:LDA:70915:STIF", - object_version : 1, position : 1, }] +let stopPoints = [{ + area_type : 'zdep', + city_name : 'Plaisir', + for_alighting : 'normal', + for_boarding : 'normal', + id : 14892, + name : 'test1', + object_id : 'test:StopPoint:1', + position : 0, + zip_code : '78490' +},{ + area_type : 'zdep', + city_name : 'Plaisir', + for_alighting : 'normal', + for_boarding : 'normal', + id : 14893, + name : 'test2', + object_id : 'test:StopPoint:2', + position : 1, + zip_code : '78490' +}] describe('journeyPatterns reducer', () => { beforeEach(()=>{ @@ -52,18 +71,19 @@ describe('journeyPatterns reducer', () => { published_name: {value: 'M3'}, registration_number: {value: ''} } + let stopPoints = stopPoints expect( jpReducer(state, { type: 'ADD_JOURNEYPATTERN', data: fakeData }) - ).toEqual([...state, { + ).toEqual([{ name : 'm3', published_name: 'M3', registration_number: '', deletable: false, - stop_points: fakeStopPoints - }]) + stop_points: stopPoints + }, ...state]) }) it('should handle UPDATE_CHECKBOX_VALUE', () => { |
