use of com.aidanwhiteley.books.domain.User in project books by aidanwhiteley.
the class UserServiceTest method testUpdateFacebookBasedUser.
@Test
void testUpdateFacebookBasedUser() {
User user = testUserCreate(facebookClientClientId, NEW_USER_2, User.AuthenticationProvider.FACEBOOK);
configureOauth(facebookClientClientId, UPDATED_USER_2);
UserService userService = configureUserService();
User updatedUser = userService.createOrUpdateUser(oauthToken);
assertEquals(UPDATED_USER_2, updatedUser.getFullName());
// Check that the user was updated and not created again
assertEquals(user.getId(), updatedUser.getId());
}
Aggregations