salix/back/methods/collection/spec/updateCollectionSale.spec.js

13 lines
475 B
JavaScript
Raw Normal View History

2020-03-30 12:28:29 +00:00
const app = require('vn-loopback/server/server');
2020-03-26 18:10:09 +00:00
describe('updateCollectionSale()', () => {
2020-03-30 12:28:29 +00:00
it('return a new collection', async() => {
let ctx = {req: {accessToken: {userId: 106}}};
let response = await app.models.Collection.updateCollectionSale(ctx, 1, 5, 5, 5, 1, 4, false, 'UXN', 1, 1);
2020-03-26 18:10:09 +00:00
2020-03-30 12:28:29 +00:00
expect(response.length).toBeGreaterThan(0);
expect(response[0][0].id).toEqual(1);
expect(response[0][0].quantity).toEqual(5);
2020-03-26 18:10:09 +00:00
});
});