diff --git a/modules/item/front/tags/index.spec.js b/modules/item/front/tags/index.spec.js index fabdc162b..34a9ce143 100644 --- a/modules/item/front/tags/index.spec.js +++ b/modules/item/front/tags/index.spec.js @@ -16,46 +16,6 @@ describe('Item', () => { controller = $componentController('vnItemTags', {$element, $scope}); })); - describe('itemTags setter', () => { - it('should call getSourceTable one time for each element in the value array', () => { - jest.spyOn(controller, 'getSourceTable'); - let itemTags = [ - {id: 1}, - {id: 2}, - {id: 3}, - {id: 4} - ]; - - controller.itemTags = itemTags; - - expect(controller.getSourceTable.mock.calls.length).toEqual(4); - expect(controller.itemTags).toEqual(itemTags); - }); - }); - - describe('getSourceTable', () => { - it('should return null when the property isFree equals true', () => { - let tag = {id: 1}; - controller.getSourceTable(tag); - - expect(controller.sourceTables[1].url).toBe(null); - }); - - it('should return the route of the model in loopback with the first char of the string uppercase and adding a s', () => { - let tag = {id: 1, tag: {sourceTable: 'ink'}}; - controller.getSourceTable(tag); - - expect(controller.sourceTables[1].url).toBe('Inks'); - }); - - it('should return the route filteritemtags with the id of the selection', () => { - let tag = {id: 1, tag: {id: 3, sourceTable: null, isFree: false}}; - controller.getSourceTable(tag); - - expect(controller.sourceTables[1].url).toBe('ItemTags/filterItemTags/3'); - }); - }); - describe('getHighestPriority', () => { it('should return the highest priority value + 1 from the array', () => { let result = controller.getHighestPriority();