fixes #5633 Reutilizar accountShortToStandard en un nuevo componente #1541
|
@ -16,12 +16,11 @@ describe('Component vnAccountNumber', () => {
|
||||||
|
|
||||||
describe('accountShortToStandard', () => {
|
describe('accountShortToStandard', () => {
|
||||||
it('should replace dots and emit event with account number', () => {
|
it('should replace dots and emit event with account number', () => {
|
||||||
const mockValue = '41.1';
|
controller.field = '41.1';
|
||||||
const expectedAccountNumber = '4100000001';
|
const expectedAccountNumber = '4100000001';
|
||||||
|
|
||||||
controller.accountShortToStandard(mockValue);
|
controller.accountShortToStandard();
|
||||||
|
|
||||||
expect(controller.accountNumber).toBe(expectedAccountNumber);
|
|
||||||
expect(controller.$.$emit).toHaveBeenCalledWith('accountShortToStandard', expectedAccountNumber);
|
expect(controller.$.$emit).toHaveBeenCalledWith('accountShortToStandard', expectedAccountNumber);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -61,7 +61,7 @@
|
||||||
<vn-account-number
|
<vn-account-number
|
||||||
vn-one
|
vn-one
|
||||||
label="Account"
|
label="Account"
|
||||||
vn-name="account"
|
name="account"
|
||||||
ng-model="$ctrl.supplier.account">
|
ng-model="$ctrl.supplier.account">
|
||||||
</vn-account-number>
|
</vn-account-number>
|
||||||
<vn-autocomplete
|
<vn-autocomplete
|
||||||
|
|
Loading…
Reference in New Issue