diff --git a/client/item/src/descriptor/index.spec.js b/client/item/src/descriptor/index.spec.js new file mode 100644 index 000000000..4e419c50f --- /dev/null +++ b/client/item/src/descriptor/index.spec.js @@ -0,0 +1,27 @@ +import './index.js'; + +describe('Item', () => { + describe('Component vnItemDescriptor', () => { + let $componentController; + let controller; + + beforeEach(() => { + angular.mock.module('item'); + }); + + beforeEach(angular.mock.inject(_$componentController_ => { + $componentController = _$componentController_; + controller = $componentController('vnItemDescriptor'); + controller.$state.go = () => {}; + })); + + describe('quicklinkGo()', () => { + it(`shoud set _itemFk to a given value and call _getItem if the given value is not null`, () => { + spyOn(controller.$state, 'go'); + controller.quicklinkGo('state', 'params'); + + expect(controller.$state.go).toHaveBeenCalledWith('state', 'params'); + }); + }); + }); +});