#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);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue