fix: backTest
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Vicent Llopis 2022-10-21 10:50:18 +02:00
parent b06f5b7246
commit 0f57a40aac
1 changed files with 1 additions and 6 deletions

View File

@ -87,10 +87,7 @@ describe('InvoiceOut', () => {
it('should make an http POST query and then call to the showSuccess() method', () => { it('should make an http POST query and then call to the showSuccess() method', () => {
jest.spyOn(controller.vnApp, 'showSuccess'); jest.spyOn(controller.vnApp, 'showSuccess');
const filter = {
order: 'id DESC',
limit: 1
};
const minShipped = new Date(); const minShipped = new Date();
minShipped.setFullYear(minShipped.getFullYear() - 1); minShipped.setFullYear(minShipped.getFullYear() - 1);
minShipped.setMonth(1); minShipped.setMonth(1);
@ -109,8 +106,6 @@ describe('InvoiceOut', () => {
invoice: controller.invoice invoice: controller.invoice
}; };
const serializedParams = $httpParamSerializer({filter});
$httpBackend.expectGET(`Clients/findOne?${serializedParams}`).respond(200, {id: 1112});
$httpBackend.expect('POST', `InvoiceOuts/clientToInvoice`).respond(response); $httpBackend.expect('POST', `InvoiceOuts/clientToInvoice`).respond(response);
$httpBackend.expect('POST', `InvoiceOuts/invoiceClient`).respond({id: 1}); $httpBackend.expect('POST', `InvoiceOuts/invoiceClient`).respond({id: 1});
controller.responseHandler('accept'); controller.responseHandler('accept');