front client specs ES6 refactor
This commit is contained in:
parent
62c15fbafa
commit
6c13fce8a9
|
@ -8,7 +8,7 @@ describe('Component vnAddressCreate', () => {
|
|||
angular.mock.module('client');
|
||||
});
|
||||
|
||||
beforeEach(angular.mock.inject(function(_$componentController_, _$state_) {
|
||||
beforeEach(angular.mock.inject((_$componentController_, _$state_) => {
|
||||
$componentController = _$componentController_;
|
||||
$state = _$state_;
|
||||
$state.params.id = '1234';
|
||||
|
|
|
@ -8,7 +8,7 @@ describe('Component vnAddressEdit', () => {
|
|||
angular.mock.module('client');
|
||||
});
|
||||
|
||||
beforeEach(angular.mock.inject(function(_$componentController_, _$state_) {
|
||||
beforeEach(angular.mock.inject((_$componentController_, _$state_) => {
|
||||
$componentController = _$componentController_;
|
||||
$state = _$state_;
|
||||
$state.params.addressId = '1234';
|
||||
|
|
|
@ -9,7 +9,7 @@ describe('Component vnClientBillingData', () => {
|
|||
angular.mock.module('client');
|
||||
});
|
||||
|
||||
beforeEach(angular.mock.inject(function(_$componentController_, $rootScope, _$httpBackend_) {
|
||||
beforeEach(angular.mock.inject((_$componentController_, $rootScope, _$httpBackend_) => {
|
||||
$componentController = _$componentController_;
|
||||
$httpBackend = _$httpBackend_;
|
||||
$scope = $rootScope.$new();
|
||||
|
|
|
@ -8,9 +8,9 @@ describe('Component vnClientCard', () => {
|
|||
angular.mock.module('client');
|
||||
});
|
||||
|
||||
beforeEach(angular.mock.inject(function(_$componentController_, $rootScope) {
|
||||
beforeEach(angular.mock.inject((_$componentController_, $rootScope) => {
|
||||
$componentController = _$componentController_;
|
||||
$scope = $scope;
|
||||
$scope = $rootScope;
|
||||
}));
|
||||
|
||||
it('should define and set client property to null in the module instance', () => {
|
||||
|
|
|
@ -9,7 +9,7 @@ describe('Component vnClientCreate', () => {
|
|||
angular.mock.module('client');
|
||||
});
|
||||
|
||||
beforeEach(angular.mock.inject(function(_$componentController_, $rootScope, _$state_) {
|
||||
beforeEach(angular.mock.inject((_$componentController_, $rootScope, _$state_) => {
|
||||
$componentController = _$componentController_;
|
||||
$scope = $rootScope.$new();
|
||||
$state = _$state_;
|
||||
|
@ -24,7 +24,7 @@ describe('Component vnClientCreate', () => {
|
|||
};
|
||||
}));
|
||||
|
||||
it('should define and set scope, state and client properties', function() {
|
||||
it('should define and set scope, state and client properties', () => {
|
||||
let controller = $componentController('vnClientCreate', {$scope: $scope});
|
||||
expect(controller.$).toBe($scope);
|
||||
expect(controller.$state).toBe($state);
|
||||
|
|
|
@ -7,7 +7,7 @@ describe('Component vnClientIndex', () => {
|
|||
angular.mock.module('client');
|
||||
});
|
||||
|
||||
beforeEach(angular.mock.inject(function(_$componentController_) {
|
||||
beforeEach(angular.mock.inject(_$componentController_ => {
|
||||
$componentController = _$componentController_;
|
||||
}));
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ describe('Component vnNoteCreate', () => {
|
|||
angular.mock.module('client');
|
||||
});
|
||||
|
||||
beforeEach(angular.mock.inject(function(_$componentController_, _$state_) {
|
||||
beforeEach(angular.mock.inject((_$componentController_, _$state_) => {
|
||||
$componentController = _$componentController_;
|
||||
$state = _$state_;
|
||||
$state.params.id = '1234';
|
||||
|
|
|
@ -9,7 +9,7 @@ describe('Component vnClientNotes', () => {
|
|||
angular.mock.module('client');
|
||||
});
|
||||
|
||||
beforeEach(angular.mock.inject(function(_$componentController_, _$state_, _$httpBackend_) {
|
||||
beforeEach(angular.mock.inject((_$componentController_, _$state_, _$httpBackend_) => {
|
||||
$componentController = _$componentController_;
|
||||
$state = _$state_;
|
||||
$httpBackend = _$httpBackend_;
|
||||
|
|
|
@ -8,7 +8,7 @@ describe('Component vnClientSearchPanel', () => {
|
|||
angular.mock.module('client');
|
||||
});
|
||||
|
||||
beforeEach(angular.mock.inject(function(_$componentController_, _$window_) {
|
||||
beforeEach(angular.mock.inject((_$componentController_, _$window_) => {
|
||||
$componentController = _$componentController_;
|
||||
$window = _$window_;
|
||||
}));
|
||||
|
|
|
@ -10,7 +10,7 @@ describe('Component VnClientWebAccess', () => {
|
|||
angular.mock.module('client');
|
||||
});
|
||||
|
||||
beforeEach(angular.mock.inject(function(_$componentController_, $rootScope, _$httpBackend_, _vnApp_) {
|
||||
beforeEach(angular.mock.inject((_$componentController_, $rootScope, _$httpBackend_, _vnApp_) => {
|
||||
$componentController = _$componentController_;
|
||||
$scope = $rootScope.$new();
|
||||
$httpBackend = _$httpBackend_;
|
||||
|
@ -40,7 +40,7 @@ describe('Component VnClientWebAccess', () => {
|
|||
});
|
||||
|
||||
describe('onPassChange()', () => {
|
||||
it('should request to update the password', function() {
|
||||
it('should request to update the password', () => {
|
||||
let controller = $componentController('vnClientWebAccess', {$scope: $scope});
|
||||
controller.client = {id: '1234'};
|
||||
controller.newPassword = 'm24x8';
|
||||
|
|
Loading…
Reference in New Issue