diff options
| author | Zog | 2018-05-14 11:41:52 +0200 |
|---|---|---|
| committer | Zog | 2018-05-14 11:41:59 +0200 |
| commit | 342b883c73c08227fec95484c01b84c19cc0b626 (patch) | |
| tree | e72762c54d42f950ba54264e533ab9861e33deaf /spec/javascript/routes | |
| parent | 4c94257d93c33bc2d6a2c4f146ebe0843763c89a (diff) | |
| download | chouette-core-342b883c73c08227fec95484c01b84c19cc0b626.tar.bz2 | |
Refs #6998: Fix JS specs6998-fix-jest-specs
Diffstat (limited to 'spec/javascript/routes')
| -rw-r--r-- | spec/javascript/routes/reducers/stop_points_spec.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/spec/javascript/routes/reducers/stop_points_spec.js b/spec/javascript/routes/reducers/stop_points_spec.js index 124618f9d..cbe45fd10 100644 --- a/spec/javascript/routes/reducers/stop_points_spec.js +++ b/spec/javascript/routes/reducers/stop_points_spec.js @@ -32,6 +32,7 @@ let stop_point = (opts) => { edit: false, for_boarding: 'normal', for_alighting: 'normal', + stoparea_kind: undefined, olMap: { isOpened: false, json: {} } }, opts @@ -100,6 +101,7 @@ describe('stops reducer', () => { city_name: 'city', area_type: 'area', short_name: 'new', + stoparea_kind: 'commercial', comment: 'newcomment' } it_should_handle( @@ -111,6 +113,31 @@ describe('stops reducer', () => { ] ) + text = { + text: "new value", + name: 'new', + stoparea_id: 1, + user_objectid: "1234", + longitude: 123, + latitude: 123, + registration_number: '0', + city_name: 'city', + area_type: 'area', + short_name: 'new', + stoparea_kind: 'non_commercial', + comment: 'newcomment' + } + let res = update_stop_point(stop_point_1, text) + res = update_stop_point(res, {for_boarding: "forbidden", for_alighting: "forbidden"}) + it_should_handle( + {type: 'UPDATE_INPUT_VALUE', index: 0, text: text}, + [ + res, + stop_point_2, + stop_point_3 + ] + ) + it_should_handle( {type: 'UPDATE_SELECT_VALUE', index: 0, select_id: 'for_boarding', select_value: 'prohibited'}, [ |
