forked from verdnatura/salix-front
chore: refs #7702 fix tests
This commit is contained in:
parent
67c2e284ba
commit
ae8e4ba4b9
|
@ -50,10 +50,21 @@ describe('VnSmsDialog', () => {
|
|||
);
|
||||
});
|
||||
|
||||
it('should call submitFn and emit onSubmit when passwords match', async () => {
|
||||
vm.passwords.newPassword = 'password';
|
||||
vm.passwords.repeatPassword = 'password';
|
||||
await vm.validate();
|
||||
expect(vm.props.submitFn).toHaveBeenCalledWith('password');
|
||||
describe('if passwords match', () => {
|
||||
it('should call submitFn and emit password', async () => {
|
||||
vm.passwords.newPassword = 'password';
|
||||
vm.passwords.repeatPassword = 'password';
|
||||
await vm.validate();
|
||||
expect(vm.props.submitFn).toHaveBeenCalledWith('password', undefined);
|
||||
});
|
||||
|
||||
it('should call submitFn and emit password and old password', async () => {
|
||||
vm.passwords.newPassword = 'password';
|
||||
vm.passwords.repeatPassword = 'password';
|
||||
vm.passwords.oldPassword = 'oldPassword';
|
||||
|
||||
await vm.validate();
|
||||
expect(vm.props.submitFn).toHaveBeenCalledWith('password', 'oldPassword');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue