23 lines
714 B
JavaScript
23 lines
714 B
JavaScript
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);
|
|
});
|
|
});
|
|
});
|