This commit is contained in:
parent
943c27142f
commit
4c29ef862f
|
@ -1,30 +0,0 @@
|
||||||
import './index.js';
|
|
||||||
|
|
||||||
describe('Zone Component vnZone', () => {
|
|
||||||
let controller;
|
|
||||||
|
|
||||||
beforeEach(ngModule('zone'));
|
|
||||||
|
|
||||||
beforeEach(inject($componentController => {
|
|
||||||
const $element = angular.element('<vn-zone></vn-zone>');
|
|
||||||
controller = $componentController('vnZone', {$element});
|
|
||||||
}));
|
|
||||||
|
|
||||||
describe('exprBuilder()', () => {
|
|
||||||
it('should return a formated object with the id in case of search', () => {
|
|
||||||
let param = 'search';
|
|
||||||
let value = 1;
|
|
||||||
let result = controller.exprBuilder(param, value);
|
|
||||||
|
|
||||||
expect(result).toEqual({id: 1});
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should return a formated object with the agencyModeFk in case of agencyModeFk', () => {
|
|
||||||
let param = 'agencyModeFk';
|
|
||||||
let value = 'My Delivery';
|
|
||||||
let result = controller.exprBuilder(param, value);
|
|
||||||
|
|
||||||
expect(result).toEqual({agencyModeFk: 'My Delivery'});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
Loading…
Reference in New Issue