2018-05-16 06:13:39 +00:00
|
|
|
const app = require(`${servicesDir}/ticket/server/server`);
|
|
|
|
|
2018-08-10 09:40:48 +00:00
|
|
|
xdescribe('ticket componentUpdate()', () => {
|
2018-08-01 12:01:42 +00:00
|
|
|
it('should call the componentUpdate method and receive an error', async() => {
|
2018-05-16 06:13:39 +00:00
|
|
|
let data = {
|
2018-08-10 09:40:48 +00:00
|
|
|
clientFk: 101,
|
2018-05-16 06:13:39 +00:00
|
|
|
agencyModeFk: 1,
|
2018-06-05 10:49:33 +00:00
|
|
|
addressFk: 121,
|
2018-05-16 06:13:39 +00:00
|
|
|
warehouseFk: 1,
|
2018-08-10 09:40:48 +00:00
|
|
|
shipped: new Date(),
|
|
|
|
landed: new Date(),
|
|
|
|
isDeleted: false,
|
|
|
|
hasToBeUnrouted: false,
|
2018-05-16 06:13:39 +00:00
|
|
|
option: 1
|
|
|
|
};
|
2018-05-30 08:55:54 +00:00
|
|
|
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');
|
2018-05-16 06:13:39 +00:00
|
|
|
});
|
|
|
|
});
|