salix/services/loopback/common/methods/ticket/specs/componentUpdate.spec.js

22 lines
692 B
JavaScript
Raw Normal View History

const app = require(`${servicesDir}/ticket/server/server`);
2018-08-10 09:40:48 +00:00
xdescribe('ticket componentUpdate()', () => {
it('should call the componentUpdate method and receive an error', async() => {
let data = {
2018-08-10 09:40:48 +00:00
clientFk: 101,
agencyModeFk: 1,
2018-06-05 10:49:33 +00:00
addressFk: 121,
warehouseFk: 1,
2018-08-10 09:40:48 +00:00
shipped: new Date(),
landed: new Date(),
isDeleted: false,
hasToBeUnrouted: false,
option: 1
};
let ctx = {req: {accessToken: {userId: 101}}};
2018-08-10 09:40:48 +00:00
let result = await app.models.Ticket.componentUpdate(1, data, ctx);
expect(result.constructor.name).toEqual('OkPacket');
});
});