aboutsummaryrefslogtreecommitdiffstats
path: root/spec/javascript/routes
diff options
context:
space:
mode:
Diffstat (limited to 'spec/javascript/routes')
-rw-r--r--spec/javascript/routes/reducers/stop_points_spec.js27
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'},
[