2020-05-19 06:46:42 +00:00
|
|
|
import './index';
|
|
|
|
|
|
|
|
describe('component vnUpcomingDeliveries', () => {
|
|
|
|
let $scope;
|
|
|
|
let controller;
|
|
|
|
|
|
|
|
beforeEach(ngModule('zone'));
|
|
|
|
|
2020-07-23 14:46:16 +00:00
|
|
|
beforeEach(inject(($componentController, $rootScope) => {
|
2020-05-19 06:46:42 +00:00
|
|
|
$scope = $rootScope.$new();
|
|
|
|
const $element = angular.element(`<vn-upcoming-deliveries></vn-upcoming-deliveries>`);
|
|
|
|
controller = $componentController('vnUpcomingDeliveries', {$element, $scope});
|
|
|
|
}));
|
|
|
|
|
2020-05-19 10:50:43 +00:00
|
|
|
describe('getWeekDay()', () => {
|
2020-05-19 06:46:42 +00:00
|
|
|
it('should retrieve a weekday for a json passed', () => {
|
|
|
|
let jsonDate = '1970-01-01T22:00:00.000Z';
|
|
|
|
|
|
|
|
expect(controller.getWeekDay(jsonDate)).toEqual('Thursday');
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|