13 lines
444 B
JavaScript
13 lines
444 B
JavaScript
const {models} = require('vn-loopback/server/server');
|
|
|
|
describe('campaign upcoming()', () => {
|
|
it('should return the upcoming campaign but from the last year', async() => {
|
|
const response = await models.Campaign.upcoming();
|
|
const campaignDated = response.dated;
|
|
const now = Date.vnNew();
|
|
|
|
expect(campaignDated).toEqual(jasmine.any(Date));
|
|
expect(campaignDated).toBeLessThanOrEqual(now);
|
|
});
|
|
});
|