Merge branch 'dev' of http://git.verdnatura.es/salix into dev

This commit is contained in:
Carlos Jimenez 2018-10-24 13:46:10 +02:00
commit 443d6ec08a
2 changed files with 10 additions and 12 deletions

View File

@ -13,7 +13,7 @@ class Controller {
set localBankFk(value) {
window.localStorage.localBankFk = value;
window.localStorage.defaultCompanyFk = value;
window.localStorage.defaultBankFk = value;
this.showOk();
}
@ -77,8 +77,6 @@ class Controller {
if (!localStorage.getItem('localCompanyFk'))
localStorage.setItem('defaultCompanyFk', res.data.companyFk);
}
console.log(localStorage.getItem('defaultWarehouseFk'), localStorage.getItem('defaultCompanyFk'));
});
}

View File

@ -19,32 +19,32 @@ describe('Salix', () => {
controller = $componentController('vnUserConfigurationPopover', {$scope: $scope, $translate: null});
}));
describe('localBank() setter', () => {
describe('localBankFk() setter', () => {
it('should set window.localStorage.localBank and call showOk', () => {
spyOn(controller, 'showOk');
controller.localBank = 4;
controller.localBankFk = 4;
expect(window.localStorage.localBank).toBe('4');
expect(window.localStorage.localBankFk).toBe('4');
expect(controller.showOk).toHaveBeenCalledWith();
});
});
describe('localWarehouse() setter', () => {
describe('localWarehouseFk() setter', () => {
it('should set window.localStorage.localWarehouse and call showOk', () => {
spyOn(controller, 'showOk');
controller.localWarehouse = 4;
controller.localWarehouseFk = 4;
expect(window.localStorage.localWarehouse).toBe('4');
expect(window.localStorage.localWarehouseFk).toBe('4');
expect(controller.showOk).toHaveBeenCalledWith();
});
});
describe('localCompany() setter', () => {
describe('localCompanyFk() setter', () => {
it('should set window.localStorage.localCompany and call showOk', () => {
spyOn(controller, 'showOk');
controller.localCompany = 4;
controller.localCompanyFk = 4;
expect(window.localStorage.localCompany).toBe('4');
expect(window.localStorage.localCompanyFk).toBe('4');
expect(controller.showOk).toHaveBeenCalledWith();
});
});