Skip to content

Commit

Permalink
Merge pull request #80 from Team-FAB/026-fix-conflicts
Browse files Browse the repository at this point in the history
fix : conflict가 발생하는 코드 해결
  • Loading branch information
yjjjwww authored Jun 19, 2023
2 parents 2084144 + 719cb67 commit 93ad755
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 20 deletions.
3 changes: 0 additions & 3 deletions src/main/java/com/fab/banggabgo/service/MyContentService.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import com.fab.banggabgo.dto.mycontent.FavoriteArticleDto;
import com.fab.banggabgo.dto.mycontent.MyArticleDto;
import com.fab.banggabgo.dto.mycontent.MyInfoDto;
import com.fab.banggabgo.dto.mycontent.PatchMyInfoDto;
import com.fab.banggabgo.dto.mycontent.PatchMyInfoRequestDto;
import com.fab.banggabgo.dto.mycontent.PatchMyInfoResultDto;
import com.fab.banggabgo.dto.mycontent.PatchMyNicknameRequestDto;
Expand All @@ -31,8 +30,6 @@ PostMyInfoImageResultDto postMyInfoImage(User user, PostMyInfoImageRequestDto dt
throws IOException;
PatchMyInfoResultDto patchMyInfo(User user, PatchMyInfoRequestDto form);

PatchMyInfoResultDto patchMyInfo(User user, PatchMyInfoDto form);

List<ApplyListResultDto> getMyFromApplicantList(User user, Integer page, Integer size);

List<ApplyListResultDto> getMyToApplicantList(User user, Integer page, Integer size);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import java.nio.file.Path;
import java.nio.file.Paths;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.junit.jupiter.MockitoExtension;
Expand Down Expand Up @@ -143,71 +144,79 @@ class applicantList {
@Test
@DisplayName("신청자리스트 - 성공")
@WithMockUser
void successGetApplicantList() throws Exception{
void successGetApplicantList() throws Exception {
mockMvc.perform(get("/api/my/from-applicants?page=1&size=4")
.with(SecurityMockMvcRequestPostProcessors.csrf()))
.with(SecurityMockMvcRequestPostProcessors.csrf()))
.andExpect(status().isOk());
}

@Test
@DisplayName("신청자리스트 - 성공 페이지 누락")
@WithMockUser
void successLostPageGetApplicantList() throws Exception{
void successLostPageGetApplicantList() throws Exception {
mockMvc.perform(get("/api/my/from-applicants?size=4")
.with(SecurityMockMvcRequestPostProcessors.csrf()))
.with(SecurityMockMvcRequestPostProcessors.csrf()))
.andExpect(status().isOk());
}

@Test
@DisplayName("신청자리스트 - 성공 사이즈 누락")
@WithMockUser
void successLostSizeGetApplicantList() throws Exception{
void successLostSizeGetApplicantList() throws Exception {
mockMvc.perform(get("/api/my/from-applicants?page=1")
.with(SecurityMockMvcRequestPostProcessors.csrf()))
.with(SecurityMockMvcRequestPostProcessors.csrf()))
.andExpect(status().isOk());
}

@Test
@DisplayName("신청자리스트 - 실패 계정 누락")
void FailNonAuthGetApplicantList() throws Exception{
void FailNonAuthGetApplicantList() throws Exception {
mockMvc.perform(get("/api/my/from-applicants?page=1&size=4")
.with(SecurityMockMvcRequestPostProcessors.csrf()))
.with(SecurityMockMvcRequestPostProcessors.csrf()))
.andExpect(status().isUnauthorized());
}
}

@Nested
@DisplayName("내가신청한 신청자리스트")
class toApplicantList {

@Test
@DisplayName("신청한리스트 - 성공")
@WithMockUser
void successGetApplicantList() throws Exception{
void successGetApplicantList() throws Exception {
mockMvc.perform(get("/api/my/to-applicants?page=1&size=4")
.with(SecurityMockMvcRequestPostProcessors.csrf()))
.with(SecurityMockMvcRequestPostProcessors.csrf()))
.andExpect(status().isOk());
}

@Test
@DisplayName("신청한리스트 - 성공 페이지 누락")
@WithMockUser
void successLostPageGetApplicantList() throws Exception{
void successLostPageGetApplicantList() throws Exception {
mockMvc.perform(get("/api/my/to-applicants?size=4")
.with(SecurityMockMvcRequestPostProcessors.csrf()))
.with(SecurityMockMvcRequestPostProcessors.csrf()))
.andExpect(status().isOk());
}

@Test
@DisplayName("신청한리스트 - 성공 사이즈 누락")
@WithMockUser
void successLostSizeGetApplicantList() throws Exception{
void successLostSizeGetApplicantList() throws Exception {
mockMvc.perform(get("/api/my/to-applicants?page=1")
.with(SecurityMockMvcRequestPostProcessors.csrf()))
.with(SecurityMockMvcRequestPostProcessors.csrf()))
.andExpect(status().isOk());
}

@Test
@DisplayName("신청한리스트 - 실패 계정 누락")
void FailNonAuthGetApplicantList() throws Exception{
void FailNonAuthGetApplicantList() throws Exception {
mockMvc.perform(get("/api/my/to-applicants?page=1&size=4")
.with(SecurityMockMvcRequestPostProcessors.csrf()))
.with(SecurityMockMvcRequestPostProcessors.csrf()))
.andExpect(status().isUnauthorized());
}

}

@Test
@DisplayName("이미지 변경 테스트")
@WithMockUser
Expand Down

0 comments on commit 93ad755

Please sign in to comment.