-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 오류나는 Dockerfile 수정 (#295) * refactor: 필요없는 러너 서포터 필드 삭제 * refactor: 필요없는 ChattingCount 필드 삭제 * feat: RunnerTechnicalTag 관련 클래스 추가 * refactor: SupporterTechnicalTag 빌더 생성자 접근제한자 private 으로 변경 * feat: SupporterRunnerPost 엔티티 생성 * refactor: dev CI 스크립트 변경 * refactor: dev CD 스크립트 변경 * refactor: deploy CI 스크립트 변경 * refactor: deploy CD 스크립트 변경 * Auth ArgumentResolver 익명 null 반환 변경 (#271) * refactor: Auth ArgumentResolver 익명 null 반환 변경 * refactor: AuthSupporterPrincipal 내부 속성 변경 * refactor: docker container timezone 변경 * feat: Dockerfile 타임존 설정 * feat: jar 타임존 설정 * fix: Dockerfile 오류 해결 --------- Co-authored-by: HyunSeo Park (Hyena) <[email protected]> * feat: 러너 게시글 전체 조회 API 구현 * fix: conflict 해결 * test: 테스트 수정 * fix: conflict 해결 * refactor: 피드백 반영 * refactor: collectApplicantCounts 메서드 로직 수정 * refactor: collectApplicantCounts 메서드 로직 수정 * refactor: 피드백 반영 * fix: 지원한 서포터가 아무도 없을 때 applicants를 계산하는 로직 수정 * refactor: queryParameters 추가 * refactor: queryParameters 추가 --------- Co-authored-by: Jeonghoon Park <[email protected]> Co-authored-by: HyunSeo Park (Hyena) <[email protected]>
- Loading branch information
1 parent
213ea51
commit 8959876
Showing
16 changed files
with
169 additions
and
86 deletions.
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
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
57 changes: 57 additions & 0 deletions
57
backend/baton/src/test/java/touch/baton/assure/runnerpost/RunnerPostReadAssuredTest.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,57 @@ | ||
package touch.baton.assure.runnerpost; | ||
|
||
import org.junit.jupiter.api.Test; | ||
import org.springframework.data.domain.PageRequest; | ||
import touch.baton.config.AssuredTestConfig; | ||
import touch.baton.domain.common.response.PageResponse; | ||
import touch.baton.domain.member.Member; | ||
import touch.baton.domain.runner.Runner; | ||
import touch.baton.domain.runnerpost.RunnerPost; | ||
import touch.baton.domain.runnerpost.controller.response.RunnerPostResponse; | ||
import touch.baton.fixture.domain.MemberFixture; | ||
import touch.baton.fixture.domain.RunnerFixture; | ||
import touch.baton.fixture.domain.RunnerPostFixture; | ||
|
||
import java.util.List; | ||
|
||
import static java.time.LocalDateTime.now; | ||
import static touch.baton.assure.runnerpost.RunnerPostAssuredSupport.러너_게시글_전체_조회_응답; | ||
import static touch.baton.fixture.vo.DeadlineFixture.deadline; | ||
import static touch.baton.fixture.vo.IntroductionFixture.introduction; | ||
|
||
@SuppressWarnings("NonAsciiCharacters") | ||
class RunnerPostReadAssuredTest extends AssuredTestConfig { | ||
|
||
@Test | ||
void 러너_게시글_전체_조회에_성공한다() { | ||
final Runner 러너_에단 = 러너를_저장한다(MemberFixture.createEthan()); | ||
final RunnerPost 러너_에단의_게시글 = 러너_게시글을_등록한다(러너_에단); | ||
runnerPostRepository.save(러너_에단의_게시글); | ||
|
||
final String 에단_액세스_토큰 = login(러너_에단.getMember().getSocialId().getValue()); | ||
|
||
final PageRequest 페이징_정보 = PageRequest.of(1, 10); | ||
final RunnerPostResponse.Simple 게시글_응답 | ||
= RunnerPostResponse.Simple.from(러너_에단의_게시글, 0); | ||
final PageResponse<RunnerPostResponse.Simple> 페이징된_게시글_응답 | ||
= 러너_게시글_전체_조회_응답(페이징_정보, List.of(게시글_응답)); | ||
|
||
RunnerPostAssuredSupport | ||
.클라이언트_요청() | ||
.토큰으로_로그인한다(에단_액세스_토큰) | ||
.전체_러너_게시글_페이징을_조회한다(페이징_정보) | ||
|
||
.서버_응답() | ||
.전체_러너_게시글_페이징_조회_성공을_검증한다(페이징된_게시글_응답); | ||
} | ||
|
||
private RunnerPost 러너_게시글을_등록한다(final Runner 러너) { | ||
return runnerPostRepository.save(RunnerPostFixture.create(러너, deadline(now().plusHours(100)))); | ||
} | ||
|
||
private Runner 러너를_저장한다(final Member member) { | ||
final Member 저장된_사용자 = memberRepository.save(member); | ||
|
||
return runnerRepository.save(RunnerFixture.createRunner(introduction("안녕하세요"), 저장된_사용자)); | ||
} | ||
} |
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
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
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
Oops, something went wrong.