From a5ac3d72be252e8001b5d823d6c050cf810094f3 Mon Sep 17 00:00:00 2001 From: Zog Date: Thu, 28 Dec 2017 11:57:12 +0100 Subject: Refs #5435 @0.5h; Fix Company select in VehicleJourney edition modal --- spec/javascript/vehicle_journeys/reducers/modal_spec.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'spec/javascript') diff --git a/spec/javascript/vehicle_journeys/reducers/modal_spec.js b/spec/javascript/vehicle_journeys/reducers/modal_spec.js index ea8a002d2..ee50f091b 100644 --- a/spec/javascript/vehicle_journeys/reducers/modal_spec.js +++ b/spec/javascript/vehicle_journeys/reducers/modal_spec.js @@ -241,13 +241,12 @@ describe('modal reducer', () => { }) it('should handle SELECT_CP_EDIT_MODAL', () => { - let newModalProps = {selectedCompany : {name: 'ALBATRANS'}} expect( modalReducer(state, { type: 'SELECT_CP_EDIT_MODAL', selectedItem: {name: 'ALBATRANS'} - }) - ).toEqual(Object.assign({}, state, {modalProps: newModalProps})) + }).modalProps.vehicleJourney.company + ).toEqual({name: 'ALBATRANS'}) }) it('should handle UNSELECT_CP_EDIT_MODAL', () => { @@ -255,7 +254,7 @@ describe('modal reducer', () => { expect( modalReducer(state, { type: 'UNSELECT_CP_EDIT_MODAL' - }) - ).toEqual(Object.assign({}, state, {modalProps: newModalProps})) + }).modalProps.vehicleJourney.company + ).toBe(undefined) }) }) -- cgit v1.2.3