Fixed test
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
71eeaadb43
commit
7895af8a54
|
@ -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.`, () => {
|
||||
|
|
Loading…
Reference in New Issue