8093-devToTest_2442_3 #831

Merged
alexm merged 335 commits from 8093-devToTest_2442_3 into test 2024-10-15 07:22:05 +00:00
1 changed files with 16 additions and 5 deletions
Showing only changes of commit ae8e4ba4b9 - Show all commits

View File

@ -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');
});
});
});