Skip to content

Commit

Permalink
[fix] : request에 대한 spring bean validation 반영
Browse files Browse the repository at this point in the history
  • Loading branch information
hyun2371 committed Aug 9, 2024
1 parent e3b45b7 commit 35a7f7b
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ void teardown() {
void registerQuestionPost() throws Exception {
RegisterQuestionPostRequest request = RegisterQuestionPostRequest.of(
"제목",
"내용",
"정정기간에 여석이 있을까요?",
List.of("image1.jpg", "image2.jpg"),
1000,
2000,
"공업"
);

Expand All @@ -62,9 +62,12 @@ void registerQuestionPost() throws Exception {
@DisplayName("[보유 크레딧이 부족하면 질문글을 등록할 수 없다.]")
@Test
void registerQuestionPostFail() throws Exception {
loginMember.decreaseCredit(5000);
memberRepository.save(loginMember); // 크레딧

RegisterQuestionPostRequest request = RegisterQuestionPostRequest.of(
"제목",
"내용",
"정정기간에 여석이 있을까요?",
List.of("image1.jpg", "image2.jpg"),
loginMember.getCredit() + 1,
"공업"
Expand Down

0 comments on commit 35a7f7b

Please sign in to comment.