aboutsummaryrefslogtreecommitdiffstats
path: root/spec/javascripts
diff options
context:
space:
mode:
authorjpl2017-02-28 19:20:03 +0100
committerjpl2017-02-28 19:20:03 +0100
commit886088ed4944865689debc8d821ce04753650e81 (patch)
treeebca5f86daa65f3076dcfa7bc645232597fed387 /spec/javascripts
parent070c93312ab8db54d6b5e5babbf5ea433ebd6f33 (diff)
downloadchouette-core-886088ed4944865689debc8d821ce04753650e81.tar.bz2
Refs #2648: jp_collection refacto, to allow adding a jp from scratch
Diffstat (limited to 'spec/javascripts')
-rw-r--r--spec/javascripts/journey_patterns/reducers/journey_patterns_spec.js26
1 files changed, 23 insertions, 3 deletions
diff --git a/spec/javascripts/journey_patterns/reducers/journey_patterns_spec.js b/spec/javascripts/journey_patterns/reducers/journey_patterns_spec.js
index 9fcabf439..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,6 +71,7 @@ describe('journeyPatterns reducer', () => {
published_name: {value: 'M3'},
registration_number: {value: ''}
}
+ let stopPoints = stopPoints
expect(
jpReducer(state, {
type: 'ADD_JOURNEYPATTERN',
@@ -62,7 +82,7 @@ describe('journeyPatterns reducer', () => {
published_name: 'M3',
registration_number: '',
deletable: false,
- stop_points: fakeStopPoints
+ stop_points: stopPoints
}, ...state])
})