From a98e911bb6f60b9414b9608e1fcd61561f033d0a Mon Sep 17 00:00:00 2001 From: Thomas Haddad Date: Tue, 15 Nov 2016 17:53:46 +0100 Subject: Add for_boarding and for_alighting attributes for stop_points Signed-off-by: Thomas Shawarma Haddad --- spec/javascripts/actions_spec.js | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) (limited to 'spec/javascripts') diff --git a/spec/javascripts/actions_spec.js b/spec/javascripts/actions_spec.js index 43ebba77f..55de1c31f 100644 --- a/spec/javascripts/actions_spec.js +++ b/spec/javascripts/actions_spec.js @@ -19,7 +19,7 @@ describe('actions', () => { }) }) describe('actions', () => { - it('should create an action to add a stop', () => { + it('should create an action to move down a stop', () => { const index = 1 const expectedAction = { type: 'MOVE_STOP_DOWN', @@ -29,7 +29,7 @@ describe('actions', () => { }) }) describe('actions', () => { - it('should create an action to add a stop', () => { + it('should create an action to delete a stop', () => { const index = 1 const expectedAction = { type: 'DELETE_STOP', @@ -39,7 +39,7 @@ describe('actions', () => { }) }) describe('actions', () => { - it('should create an action to add a stop', () => { + it('should create an action to update the value of a stop', () => { const text = 'updated text' const index = 1 const expectedAction = { @@ -50,3 +50,22 @@ describe('actions', () => { expect(actions.updateInputValue(index, text)).toEqual(expectedAction) }) }) + +describe('actions', () => { + it('should create an action to update the up select of a stop', () => { + const event = { + currentTarget: { + value: 'forbidden', + id: 'up' + } + } + const index = 1 + const expectedAction = { + type :'UPDATE_SELECT_VALUE', + select_id: 'up', + select_value: 'forbidden', + index + } + expect(actions.updateSelectValue(event, index)).toEqual(expectedAction) + }) +}) -- cgit v1.2.3