diff --git a/modules/travel/front/create/index.spec.js b/modules/travel/front/create/index.spec.js index 6771afce0a..a9d5a1b026 100644 --- a/modules/travel/front/create/index.spec.js +++ b/modules/travel/front/create/index.spec.js @@ -54,15 +54,21 @@ describe('Travel Component vnTravelCreate', () => { it(`should do nothing if it hasn't value on response data.`, () => { controller.travel = {agencyModeFk: 4}; const tomorrow = new Date(); - const result = [{}]; - const expectedResponse = [{}]; + const expectedResponse = [{ + agencyModeFk: 4, + warehouseInFk: undefined, + warehouseOutFk: undefined, + dayDuration: 0 + }]; const query = `travels/getAverageDays?agencyModeFk=${controller.travel.agencyModeFk}`; $httpBackend.expectGET(query).respond(expectedResponse); controller.onShippedChange(tomorrow); $httpBackend.flush(); - expect(expectedResponse).toEqual(result); + expect(controller.travel.warehouseInFk).toEqual(expectedResponse.warehouseInFk); + expect(controller.travel.warehouseOutFk).toEqual(expectedResponse.warehouseOutFk); + expect(controller.travel.dayDuration).toEqual(expectedResponse.dayDuration); }); it(`should fill the fields when it's selected a date and agency.`, () => {