Tests fix && renamed .list to .index states

This commit is contained in:
Joan Sanchez 2018-05-24 15:02:38 +02:00
parent d20faedd64
commit 09c98368b8
9 changed files with 15 additions and 15 deletions

View File

@ -1,7 +1,7 @@
import './index';
describe('Client', () => {
describe('Component vnAddressCreate', () => {
describe('Component vnClientAddressCreate', () => {
let controller;
let $componentController;
let $state;
@ -14,7 +14,7 @@ describe('Client', () => {
$componentController = _$componentController_;
$state = _$state_;
$state.params.id = '1234';
controller = $componentController('vnAddressCreate', {$state});
controller = $componentController('vnClientAddressCreate', {$state});
}));
it('should define and set address property', () => {

View File

@ -1,7 +1,7 @@
import './index';
describe('Client', () => {
describe('Component vnAddressEdit', () => {
describe('Component vnClientAddressEdit', () => {
let $componentController;
let $state;
let controller;
@ -16,7 +16,7 @@ describe('Client', () => {
$state = _$state_;
$httpBackend = _$httpBackend_;
$state.params.addressId = '1';
controller = $componentController('vnAddressEdit', {$state: $state});
controller = $componentController('vnClientAddressEdit', {$state: $state});
}));
it('should define and set address property', () => {

View File

@ -1,7 +1,7 @@
import './index';
describe('Client', () => {
describe('Component vnClientCreditClassificationList', () => {
describe('Component vnClientCreditInsuranceIndex', () => {
let $componentController;
let controller;
let $httpBackend;
@ -13,7 +13,7 @@ describe('Client', () => {
beforeEach(angular.mock.inject((_$componentController_, _$httpBackend_) => {
$componentController = _$componentController_;
$httpBackend = _$httpBackend_;
controller = $componentController('vnClientCreditClassificationList');
controller = $componentController('vnClientCreditInsuranceIndex');
}));
describe('_getClassifications()', () => {

View File

@ -1,7 +1,7 @@
import './index';
describe('Client', () => {
describe('Component vnClientCreditInsuranceList', () => {
describe('Component vnClientCreditInsuranceInsuranceIndex', () => {
let $componentController;
let controller;
let $httpBackend;
@ -14,7 +14,7 @@ describe('Client', () => {
$componentController = _$componentController_;
let $state = {params: {classificationId: 1}};
$httpBackend = _$httpBackend_;
controller = $componentController('vnClientCreditInsuranceList', {$state: $state});
controller = $componentController('vnClientCreditInsuranceInsuranceIndex', {$state: $state});
}));
it('should perform a query to GET credit the credit classification', () => {

View File

@ -78,7 +78,7 @@ describe('Client', () => {
client.credit = 1;
controller.addCredit();
expect(controller.$state.go).toHaveBeenCalledWith('client.card.credit.list');
expect(controller.$state.go).toHaveBeenCalledWith('client.card.credit.index');
});
});
});

View File

@ -32,7 +32,7 @@ describe('Client', () => {
spyOn($state, 'go');
controller.onSubmit();
expect(controller.$state.go).toHaveBeenCalledWith('client.card.greuge.list');
expect(controller.$state.go).toHaveBeenCalledWith('client.card.greuge.index');
});
});
});

View File

@ -1,7 +1,7 @@
import './index';
describe('Client', () => {
describe('Component vnClientNotes', () => {
describe('Component vnClientNote', () => {
let $componentController;
let $state;
let $httpBackend;
@ -16,7 +16,7 @@ describe('Client', () => {
$state = _$state_;
$httpBackend = _$httpBackend_;
$httpBackend.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({});
controller = $componentController('vnClientNotes', {$state: $state});
controller = $componentController('vnClientNote', {$state: $state});
}));
describe('$onChanges()', () => {
@ -51,7 +51,7 @@ describe('Client', () => {
spyOn(controller.$state, 'go');
controller.newObservation();
expect(controller.$state.go).toHaveBeenCalledWith('client.card.notes.create', Object({id: '1234'}));
expect(controller.$state.go).toHaveBeenCalledWith('client.card.note.create', Object({id: '1234'}));
});
});
});

View File

@ -12,7 +12,7 @@ class Controller {
this.recovery.clientFk = this.$state.params.id;
this.$.watcher.submit().then(
() => {
this.$state.go('client.card.recovery.list');
this.$state.go('client.card.recovery.index');
}
);
}

View File

@ -32,7 +32,7 @@ describe('Client', () => {
spyOn($state, 'go');
controller.onSubmit();
expect(controller.$state.go).toHaveBeenCalledWith('client.card.recovery.list');
expect(controller.$state.go).toHaveBeenCalledWith('client.card.recovery.index');
});
});
});