item descriptor front test
This commit is contained in:
parent
f0df298138
commit
a58e534a6d
|
@ -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');
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue