aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/javascripts/actions_spec.js25
1 files changed, 22 insertions, 3 deletions
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)
+ })
+})