20 lines
603 B
JavaScript
20 lines
603 B
JavaScript
const app = require(`${servicesDir}/ticket/server/server`);
|
|
|
|
describe('ticket componentUpdate()', () => {
|
|
it('should call the componentUpdate method', done => {
|
|
let data = {
|
|
agencyModeFk: 1,
|
|
addressFk: 121,
|
|
warehouseFk: 1,
|
|
shipped: Date.now(),
|
|
landed: Date.now(),
|
|
option: 1
|
|
};
|
|
app.models.Ticket.componentUpdate(1, data)
|
|
.catch(response => {
|
|
expect(response).toEqual(new Error('ER_SIGNAL_EXCEPTION: NO_AGENCY_AVAILABLE'));
|
|
done();
|
|
});
|
|
});
|
|
});
|