diff --git a/services/loopback/common/methods/client/specs/getMana.spec.js b/services/loopback/common/methods/client/specs/getMana.spec.js index 1b621faab..fcaeb3730 100644 --- a/services/loopback/common/methods/client/specs/getMana.spec.js +++ b/services/loopback/common/methods/client/specs/getMana.spec.js @@ -7,4 +7,3 @@ describe('client getMana()', () => { expect(result.mana).toEqual(151.33); }); }); - diff --git a/services/loopback/common/methods/sale/specs/removes.spec.js b/services/loopback/common/methods/sale/specs/removes.spec.js index 1032129f9..fd74f3641 100644 --- a/services/loopback/common/methods/sale/specs/removes.spec.js +++ b/services/loopback/common/methods/sale/specs/removes.spec.js @@ -1,14 +1,13 @@ const app = require(`${servicesDir}/ticket/server/server`); -xdescribe('sale removes()', () => { +describe('sale removes()', () => { let sale; + let newsale; beforeAll(async() => { - sale = await app.models.Sale.findOne({where: {id: 1}}); - }); - - afterAll(async() => { - await app.models.Sale.create(sale); + sale = await app.models.Sale.findOne({where: {id: 9}}); + sale.id = null; + newsale = await app.models.Sale.create(sale); }); it('should throw an error if the ticket of the given sales is not editable', async() => { @@ -30,8 +29,8 @@ xdescribe('sale removes()', () => { it('should delete the sales', async() => { let params = { - sales: [{id: 1, instance: 0}], - actualTicketFk: 1 + sales: [{id: newsale.id, instance: 0}], + actualTicketFk: 16 }; let res = await app.models.Sale.removes(params);