salix/modules/worker/front/note/create/index.spec.js

23 lines
714 B
JavaScript
Raw Normal View History

2023-04-20 06:24:43 +00:00
import './index';
describe('Worker', () => {
describe('Component vnNoteWorkerCreate', () => {
let $state;
let controller;
beforeEach(ngModule('worker'));
beforeEach(inject(($componentController, _$state_) => {
$state = _$state_;
$state.params.id = '1234';
const $element = angular.element('<vn-note-create></vn-note-create>');
controller = $componentController('vnNoteWorkerCreate', {$element, $state});
}));
it('should define workerFk using $state.params.id', () => {
expect(controller.note.workerFk).toBe(1234);
expect(controller.note.worker).toBe(undefined);
});
});
});