diff options
| author | Luc Donnet | 2018-05-15 15:29:10 +0200 |
|---|---|---|
| committer | GitHub | 2018-05-15 15:29:10 +0200 |
| commit | fc2aa2640185a081231d2f726bb345e5bd7709a9 (patch) | |
| tree | bbf8632c24d01faee28a1a209b3e84f0041a275e /spec/javascript/routes | |
| parent | 0ea92f772d7eb8facd7cedd50d50531e25664af5 (diff) | |
| parent | 342b883c73c08227fec95484c01b84c19cc0b626 (diff) | |
| download | chouette-core-fc2aa2640185a081231d2f726bb345e5bd7709a9.tar.bz2 | |
Merge pull request #567 from af83/6998-fix-jest-specs
6998 Fix JS 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'}, [ |
