26 lines
826 B
JavaScript
26 lines
826 B
JavaScript
import './index';
|
|
|
|
describe('Client', () => {
|
|
describe('Component vnNoteCreate', () => {
|
|
let $componentController;
|
|
let $state;
|
|
let controller;
|
|
|
|
beforeEach(angular.mock.module('client', $translateProvider => {
|
|
$translateProvider.translations('en', {});
|
|
}));
|
|
|
|
beforeEach(angular.mock.inject((_$componentController_, _$state_) => {
|
|
$componentController = _$componentController_;
|
|
$state = _$state_;
|
|
$state.params.id = '1234';
|
|
controller = $componentController('vnNoteCreate', {$state: $state});
|
|
}));
|
|
|
|
it('should define clientFk using $state.params.id', () => {
|
|
expect(controller.note.clientFk).toBe(1234);
|
|
expect(controller.note.client).toBe(undefined);
|
|
});
|
|
});
|
|
});
|