#743 Add proper error message for "invalid chars in password"
- Change password validation to return a ValidationResult object for passing message arguments - Remove wrapping methods in ProcessService and CommandService and use ValidationService directly
This commit is contained in:
@@ -127,21 +127,6 @@ public class ProcessServiceTest {
|
||||
verify(messages).retrieveSingle(key);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldValidatePassword() {
|
||||
// given
|
||||
String user = "test-user";
|
||||
String password = "passw0rd";
|
||||
given(validationService.validatePassword(password, user)).willReturn(MessageKey.PASSWORD_MATCH_ERROR);
|
||||
|
||||
// when
|
||||
MessageKey result = processService.validatePassword(password, user);
|
||||
|
||||
// then
|
||||
assertThat(result, equalTo(MessageKey.PASSWORD_MATCH_ERROR));
|
||||
verify(validationService).validatePassword(password, user);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldValidateEmail() {
|
||||
// given
|
||||
|
||||
Reference in New Issue
Block a user