18 lines
588 B
JavaScript
18 lines
588 B
JavaScript
const app = require(`${servicesDir}/ticket/server/server`);
|
|
|
|
describe('sale priceDifference()', () => {
|
|
it('should call the priceDifference method and return a NO_AGENCY_AVAILABLE signal error', done => {
|
|
let data = {
|
|
landed: Date.now(),
|
|
addressFk: 121,
|
|
agencyModeFk: 1,
|
|
warehouseFk: 1
|
|
};
|
|
app.models.Sale.priceDifference(1, data)
|
|
.catch(response => {
|
|
expect(response).toEqual(new Error('ER_SIGNAL_EXCEPTION: NO_AGENCY_AVAILABLE'));
|
|
done();
|
|
});
|
|
});
|
|
});
|