#751 removes.spec.js repairs
This commit is contained in:
parent
ed80915120
commit
f4add0942c
|
@ -7,4 +7,3 @@ describe('client getMana()', () => {
|
||||||
expect(result.mana).toEqual(151.33);
|
expect(result.mana).toEqual(151.33);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
const app = require(`${servicesDir}/ticket/server/server`);
|
const app = require(`${servicesDir}/ticket/server/server`);
|
||||||
|
|
||||||
xdescribe('sale removes()', () => {
|
describe('sale removes()', () => {
|
||||||
let sale;
|
let sale;
|
||||||
|
let newsale;
|
||||||
|
|
||||||
beforeAll(async() => {
|
beforeAll(async() => {
|
||||||
sale = await app.models.Sale.findOne({where: {id: 1}});
|
sale = await app.models.Sale.findOne({where: {id: 9}});
|
||||||
});
|
sale.id = null;
|
||||||
|
newsale = await app.models.Sale.create(sale);
|
||||||
afterAll(async() => {
|
|
||||||
await app.models.Sale.create(sale);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should throw an error if the ticket of the given sales is not editable', async() => {
|
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() => {
|
it('should delete the sales', async() => {
|
||||||
let params = {
|
let params = {
|
||||||
sales: [{id: 1, instance: 0}],
|
sales: [{id: newsale.id, instance: 0}],
|
||||||
actualTicketFk: 1
|
actualTicketFk: 16
|
||||||
};
|
};
|
||||||
|
|
||||||
let res = await app.models.Sale.removes(params);
|
let res = await app.models.Sale.removes(params);
|
||||||
|
|
Loading…
Reference in New Issue