2019-05-13 12:34:37 +00:00
|
|
|
const app = require('vn-loopback/server/server');
|
|
|
|
|
|
|
|
describe('Agency landsThatDay()', () => {
|
|
|
|
const today = new Date();
|
|
|
|
it('should return a list of agencies that can land a shipment on a day for an address', async() => {
|
|
|
|
let filter = {
|
|
|
|
addressFk: 101,
|
|
|
|
landed: today,
|
|
|
|
};
|
|
|
|
|
2019-06-07 11:07:23 +00:00
|
|
|
let agencies = await app.models.Agency.landsThatDay(filter);
|
2019-05-13 12:34:37 +00:00
|
|
|
|
2019-07-05 12:16:33 +00:00
|
|
|
expect(agencies.length).toBeGreaterThanOrEqual(3);
|
2019-05-13 12:34:37 +00:00
|
|
|
});
|
|
|
|
});
|