From a161edb60b012583b6a9b587ac2221bc4435015a Mon Sep 17 00:00:00 2001 From: youKeon Date: Wed, 22 Nov 2023 17:10:11 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20CI=20=EC=97=90=EB=9F=AC=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../RecruitmentCustomRepositoryImpl.java | 21 ++++----- .../controller/ProjectIntegrationTest.java | 46 ------------------- 2 files changed, 9 insertions(+), 58 deletions(-) delete mode 100644 backend/src/test/java/com/graphy/backend/domain/project/controller/ProjectIntegrationTest.java diff --git a/backend/src/main/java/com/graphy/backend/domain/recruitment/repository/custom/RecruitmentCustomRepositoryImpl.java b/backend/src/main/java/com/graphy/backend/domain/recruitment/repository/custom/RecruitmentCustomRepositoryImpl.java index 7cfaac0e..18c91506 100644 --- a/backend/src/main/java/com/graphy/backend/domain/recruitment/repository/custom/RecruitmentCustomRepositoryImpl.java +++ b/backend/src/main/java/com/graphy/backend/domain/recruitment/repository/custom/RecruitmentCustomRepositoryImpl.java @@ -1,24 +1,22 @@ package com.graphy.backend.domain.recruitment.repository.custom; -import static com.graphy.backend.domain.member.domain.QMember.member; -import static com.graphy.backend.domain.project.domain.QTag.tag; -import static com.graphy.backend.domain.recruitment.domain.QRecruitment.recruitment; -import static com.graphy.backend.domain.recruitment.domain.QRecruitmentTag.recruitmentTag; -import static org.springframework.util.StringUtils.hasText; - import com.graphy.backend.domain.recruitment.domain.Position; import com.graphy.backend.domain.recruitment.domain.Recruitment; import com.graphy.backend.domain.recruitment.repository.RecruitmentCustomRepository; import com.querydsl.core.BooleanBuilder; import com.querydsl.core.types.dsl.BooleanExpression; import com.querydsl.jpa.impl.JPAQueryFactory; -import java.time.LocalDateTime; import lombok.RequiredArgsConstructor; import org.springframework.data.domain.Pageable; + import java.util.List; import java.util.Optional; -import lombok.RequiredArgsConstructor; -import org.springframework.data.domain.Pageable; + +import static com.graphy.backend.domain.member.domain.QMember.member; +import static com.graphy.backend.domain.project.domain.QTag.tag; +import static com.graphy.backend.domain.recruitment.domain.QRecruitment.recruitment; +import static com.graphy.backend.domain.recruitment.domain.QRecruitmentTag.recruitmentTag; +import static org.springframework.util.StringUtils.hasText; @RequiredArgsConstructor public class RecruitmentCustomRepositoryImpl implements RecruitmentCustomRepository { @@ -27,7 +25,7 @@ public class RecruitmentCustomRepositoryImpl implements RecruitmentCustomReposit @Override public List findRecruitments(List positions, List tags, - String title, + String keyword, Boolean isRecruiting, Pageable pageable) { @@ -37,8 +35,7 @@ public List findRecruitments(List positions, .where( tagIn(tags), positionIn(positions), - recruitmentKeywordContains(keyword) - recruitmentTitleLike(title), + recruitmentKeywordContains(keyword), isRecruiting(isRecruiting) ) .join(recruitment.member, member).fetchJoin() diff --git a/backend/src/test/java/com/graphy/backend/domain/project/controller/ProjectIntegrationTest.java b/backend/src/test/java/com/graphy/backend/domain/project/controller/ProjectIntegrationTest.java deleted file mode 100644 index 5c69dcdf..00000000 --- a/backend/src/test/java/com/graphy/backend/domain/project/controller/ProjectIntegrationTest.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.graphy.backend.domain.project.controller; - -import com.graphy.backend.domain.project.dto.request.CreateProjectRequest; -import com.graphy.backend.test.util.IntegrationTest; -import com.graphy.backend.test.util.WithMockCustomUser; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.DisplayName; -import org.junit.jupiter.api.Test; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.MediaType; -import org.springframework.web.context.WebApplicationContext; - -import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.post; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; - -class ProjectIntegrationTest extends IntegrationTest { - - @Autowired - private WebApplicationContext context; - - private static final String BASE_URL = "/api/v1/projects"; - - @BeforeEach - public void setup() { - this.mvc = this.buildMockMvc(context); - } - - @Test - @WithMockCustomUser - @DisplayName("프로젝트 생성 테스트") - void createProject() throws Exception { - //given - CreateProjectRequest request = CreateProjectRequest.builder() - .projectName("projectName") - .description("description") - .content("content") - .build(); - - //then - mvc.perform(post(BASE_URL) - .contentType(MediaType.APPLICATION_JSON) - .content(objectMapper.writeValueAsString(request))) - .andExpect(status().isCreated()); - } - -}