import './index'; describe('Client', () => { describe('Component vnNoteCreate', () => { let $state; let controller; beforeEach(ngModule('client')); beforeEach(inject(($componentController, _$state_) => { $state = _$state_; $state.params.id = '1234'; const $element = angular.element(''); controller = $componentController('vnNoteCreate', {$element, $state}); })); it('should define clientFk using $state.params.id', () => { expect(controller.note.clientFk).toBe(1234); expect(controller.note.client).toBe(undefined); }); }); });