Cover SecurityCheckProvider.SecurityCheckInjectable.cookieLogin with tests

This commit is contained in:
Sankaranarayanan Viswanathan
2014-10-11 13:18:09 -04:00
parent 326ee79c8c
commit 0059cabebe
3 changed files with 106 additions and 3 deletions

View File

@@ -54,7 +54,7 @@ public class UserService {
boolean authenticated = encryptionService.authenticate(password, user.getPassword(), user.getSalt());
if (authenticated) {
afterLogin(user);
return Optional.fromNullable(user);
return Optional.of(user);
}
}
return Optional.absent();