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

22 lines
692 B
JavaScript

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