-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/#81 로그인 사용자 프로필 이미지 추가 기능 구현 #87
Merged
hyeonjerry
merged 4 commits into
backend-main
from
Feature/#81-로그인_사용자_프로필_이미지_추가_기능_구현
Jul 25, 2023
The head ref may contain hidden characters: "Feature/#81-\uB85C\uADF8\uC778_\uC0AC\uC6A9\uC790_\uD504\uB85C\uD544_\uC774\uBBF8\uC9C0_\uCD94\uAC00_\uAE30\uB2A5_\uAD6C\uD604"
Merged
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...msale/login/application/GithubClient.java → ...com/emmsale/login/utils/GithubClient.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
backend/emm-sale/src/test/java/com/emmsale/member/application/MemberQueryServiceTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
package com.emmsale.member.application; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
import com.emmsale.helper.ServiceIntegrationTestHelper; | ||
import com.emmsale.login.application.dto.GithubProfileResponse; | ||
import com.emmsale.login.application.dto.MemberQueryResponse; | ||
import org.junit.jupiter.api.DisplayName; | ||
import org.junit.jupiter.api.Test; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
|
||
class MemberQueryServiceTest extends ServiceIntegrationTestHelper { | ||
|
||
@Autowired | ||
private MemberQueryService memberQueryService; | ||
|
||
@Test | ||
@DisplayName("사용자를 조회하고 조회 결과를 반환한다.") | ||
void findOrCreateMemberTest() { | ||
//given | ||
final MemberQueryResponse expectResponse = new MemberQueryResponse(1L, false); | ||
|
||
final GithubProfileResponse githubProfileFromGithub = new GithubProfileResponse("1", "name", | ||
"username", "https://imageUrl.com"); | ||
|
||
//when | ||
final MemberQueryResponse actualResponse = memberQueryService.findOrCreateMember( | ||
githubProfileFromGithub); | ||
|
||
//then | ||
assertThat(expectResponse) | ||
.usingRecursiveComparison() | ||
.ignoringCollectionOrder() | ||
.isEqualTo(actualResponse); | ||
} | ||
|
||
@Test | ||
@DisplayName("사용자를 조회하고 존재하지 않으므로 새로 생성하고 생성한 결과를 반환한다.") | ||
void findOrCreateMemberTestWithNewMember() { | ||
//given | ||
final MemberQueryResponse expectResponse = new MemberQueryResponse(3L, true); | ||
|
||
final GithubProfileResponse githubProfileFromGithub = new GithubProfileResponse("0", "name", | ||
"username", "https://imageUrl.com"); | ||
|
||
//when | ||
final MemberQueryResponse actualResponse = memberQueryService.findOrCreateMember( | ||
githubProfileFromGithub); | ||
|
||
//then | ||
assertThat(expectResponse) | ||
.usingRecursiveComparison() | ||
.ignoringCollectionOrder() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 요건 굳이 필요 없는 친구인것 같아요. |
||
.isEqualTo(actualResponse); | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
혹시 필요없는 생성자면 지워주시면 감사하겠습니다.