-
Notifications
You must be signed in to change notification settings - Fork 1
[test] 스터디 가입 요청/수락/거절 API 인수 테스트 추가 #54
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
Open
crtEvent
wants to merge
16
commits into
feat/#25-impl-join-request-3
Choose a base branch
from
test/#25-add-join-request-test-2
base: feat/#25-impl-join-request-3
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
ad677a8
rename: AcceptanceTest 패키지 위치 acceptance로 변경
crtEvent 3861e98
refactor: AcceptanceTest에 응답코드 검증 세분화
crtEvent ee46111
chore: AcceptanceTest에 Redis Test Container 설정 추가
crtEvent f718c6d
test: 테스트용 로그인 Step 메서드 추가
crtEvent bdf8a22
test: JoinRequestStep 추가
crtEvent f3cba4b
test: JoinRequestFixture 추가
crtEvent 9618f2f
test: 스터디 가입 요청 인수 테스트 추가
crtEvent e15ff41
test: 스터디 가입 요청 수락 인수 테스트 추가
crtEvent 9cc975b
test: 스터디 가입 요청 거절 인수 테스트 추가
crtEvent 0820ef5
fix: JoinRequestStep 스터디 가입 요청/거절 API 요청 patch 메서드로 수정
crtEvent bb3119c
chore: 테스트 설정 파일에 session-name 추가
crtEvent 0932f6f
chore: reset.sql에 join_request 테이블 추가
crtEvent 87cd02b
test: 스터디 가입 요청 수락/거절시 study_id 검증 케이스 추가
crtEvent 5c3a754
fix: 오타 수정
crtEvent 71f4877
rename: Fixture 분리 및 위치 변경
crtEvent 6108631
fix: EnableJpaAuditing 중복된 설정 제거
crtEvent 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
70 changes: 70 additions & 0 deletions
70
...est/java/com/flytrap/venusplanner/acceptance/join_request/fixture/JoinRequestFixture.java
This file contains hidden or 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,70 @@ | ||
| package com.flytrap.venusplanner.acceptance.join_request.fixture; | ||
|
|
||
| import com.flytrap.venusplanner.api.access.domain.Permission; | ||
| import com.flytrap.venusplanner.api.access.domain.Roll; | ||
| import com.flytrap.venusplanner.api.join_request.domain.JoinRequest; | ||
| import com.flytrap.venusplanner.api.join_request.domain.JoinRequestState; | ||
| import com.flytrap.venusplanner.api.member.domain.Member; | ||
| import com.flytrap.venusplanner.api.member.domain.OAuthPlatformType; | ||
| import com.flytrap.venusplanner.api.member_study.domain.MemberStudy; | ||
| import com.flytrap.venusplanner.api.study.domain.Study; | ||
|
|
||
| public class JoinRequestFixture { | ||
|
|
||
| public static Member 리더() { | ||
| return Member.builder() | ||
| .oauthPk("00000") | ||
| .oauthPlatformId(OAuthPlatformType.GITHUB.getId()) | ||
| .email("[email protected]") | ||
| .nickname("leader") | ||
| .profileImageUrl("https://test.com") | ||
| .build(); | ||
| } | ||
|
|
||
| public static Member 멤버_01() { | ||
| return Member.builder() | ||
| .oauthPk("11111") | ||
| .oauthPlatformId(OAuthPlatformType.GITHUB.getId()) | ||
| .email("[email protected]") | ||
| .nickname("member01") | ||
| .profileImageUrl("https://test.com") | ||
| .build(); | ||
| } | ||
|
|
||
| public static Study 알고리즘_스터디() { | ||
| return new Study("알고리즘 챌린지", "알고리즘 실력을 쌓아갑니다."); | ||
| } | ||
|
|
||
| public static MemberStudy 리더_멤버_스터디(Study study, Member leader) { | ||
| return MemberStudy.fromLeader(leader.getId(), study); | ||
| } | ||
|
|
||
| public static MemberStudy 멤버_스터디(Study study, Member member) { | ||
| return MemberStudy.builder() | ||
| .memberId(member.getId()) | ||
| .study(study) | ||
| .rollId(Roll.MEMBER.getId()) | ||
| .permissionId(Permission.NONE.getId()) | ||
| .build(); | ||
| } | ||
|
|
||
| public static JoinRequest 신규_가입_요청(Study study, Member member) { | ||
| return JoinRequest.create(study.getId(), member.getId()); | ||
| } | ||
|
|
||
| public static JoinRequest 수락된_가입_요청(Study study, Member member) { | ||
| return JoinRequest.builder() | ||
| .studyId(study.getId()) | ||
| .memberId(member.getId()) | ||
| .state(JoinRequestState.ACCEPT) | ||
| .build(); | ||
| } | ||
|
|
||
| public static JoinRequest 거절된_가입_요청(Study study, Member member) { | ||
| return JoinRequest.builder() | ||
| .studyId(study.getId()) | ||
| .memberId(member.getId()) | ||
| .state(JoinRequestState.REJECT) | ||
| .build(); | ||
| } | ||
| } | ||
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.
흐음.. 에이프랑 저랑 사용하는 픽스쳐 형태가 달라서 fixture 를 어떻게 관리하면 좋을지 논의해보면 좋긴 할 것 같네요