4875-fix-back-tests #1240

Merged
pau merged 10 commits from 4875-fix-back-tests into dev 2023-01-11 13:25:40 +00:00
2 changed files with 1 additions and 5 deletions
Showing only changes of commit 56354ba771 - Show all commits

View File

@ -11,7 +11,6 @@ describe('InvoiceOut createPdf()', () => {
const ctx = {req: activeCtx}; const ctx = {req: activeCtx};
it('should create a new PDF file and set true the hasPdf property', async() => { it('should create a new PDF file and set true the hasPdf property', async() => {
// pending('https://redmine.verdnatura.es/issues/4875');
const invoiceId = 1; const invoiceId = 1;
spyOn(LoopBackContext, 'getCurrentContext').and.returnValue({ spyOn(LoopBackContext, 'getCurrentContext').and.returnValue({
active: activeCtx active: activeCtx

View File

@ -66,10 +66,7 @@ describe('InvoiceOut filter()', () => {
const result = await models.InvoiceOut.filter(ctx, {id: invoiceOut.id}, options); const result = await models.InvoiceOut.filter(ctx, {id: invoiceOut.id}, options);
// expect(result.length).toEqual(1); expect(result.length).toEqual(1);
expect(result.length).toBeGreaterThanOrEqual(1);
// Debido a que parece que esta fallando debido a un test anterior que no hace rollback
// y deja la base de datos en un estado inconsistente, se cambia el expect a que sea mayor o igual a 1.
await tx.rollback(); await tx.rollback();
} catch (e) { } catch (e) {