Skip to content

Commit

Permalink
[Fix] Feign 에러 해결 (#407)
Browse files Browse the repository at this point in the history
  • Loading branch information
kseysh authored Oct 10, 2024
2 parents 246715b + 35c4aff commit cc047ff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/test/java/org/sopt/app/application/UserServiceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class UserServiceTest {
void SUCCESS_upsertNoRegisteredUser() {
//given
final Long anyUserId = anyLong();
PlaygroundMain playgroundMemberResponse = PlaygroundMain.builder().id(anyUserId).build();
PlaygroundMain playgroundMemberResponse = PlaygroundMain.builder().id(anyUserId).hasProfile(true).build();
LoginInfo loginInfo = LoginInfo.of(playgroundMemberResponse, "token");

//when
Expand All @@ -51,7 +51,7 @@ void SUCCESS_upsertNoRegisteredUser() {
void SUCCESS_upsertRegisteredUser() {
//given
final Long anyUserId = anyLong();
PlaygroundMain playgroundMemberResponse = PlaygroundMain.builder().id(anyUserId).build();
PlaygroundMain playgroundMemberResponse = PlaygroundMain.builder().id(anyUserId).hasProfile(true).build();
LoginInfo loginInfo = LoginInfo.of(playgroundMemberResponse, "token");

User registeredUser = User.builder().id(anyUserId).build();
Expand Down
3 changes: 2 additions & 1 deletion src/test/java/org/sopt/app/facade/AuthFacadeTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ void SUCCESS_loginWithPlaygroundActive() {
Long userId = SoptampUserFixture.SOPTAMP_USER_1.getUserId();
Long playgroundId = UserFixture.myPlaygroundId;
AppToken appToken = AppToken.builder().accessToken("appAccessToken").refreshToken("appRefreshToken").build();
when(playgroundAuthService.getPlaygroundMember(refreshedToken.getAccessToken())).thenReturn(PlaygroundMain.builder().id(playgroundId).build());
when(playgroundAuthService.getPlaygroundMember(refreshedToken.getAccessToken()))
.thenReturn(PlaygroundMain.builder().id(playgroundId).hasProfile(true).build());
when(playgroundAuthService.getPlaygroundAccessToken(codeRequest)).thenReturn(accessTokenRequest);
when(playgroundAuthService.refreshPlaygroundToken(accessTokenRequest)).thenReturn(refreshedToken);
when(playgroundAuthService.getPlaygroundMemberProfile(refreshedToken.getAccessToken(), playgroundId))
Expand Down

0 comments on commit cc047ff

Please sign in to comment.