-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b5c46ec
commit 6e41901
Showing
10 changed files
with
516 additions
and
60 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
4 changes: 2 additions & 2 deletions
4
server/src/main/kotlin/com/fone/jobOpening/domain/service/LocationService.kt
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
6 changes: 3 additions & 3 deletions
6
...obOpening/presentation/dto/LocationDto.kt → ...ng/presentation/dto/common/LocationDto.kt
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 |
---|---|---|
@@ -1,15 +1,15 @@ | ||
package com.fone.jobOpening.presentation.dto | ||
package com.fone.jobOpening.presentation.dto.common | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema | ||
|
||
class LocationDto { | ||
data class RetrieveRegionsResponse( | ||
@Schema(description = "지역", example = "서울특별시") | ||
@Schema(description = "지역", example = "[\"서울특별시\"]") | ||
val regions: List<String>, | ||
) | ||
|
||
data class RetrieveDistrictsResponse( | ||
@Schema(description = "시군구", example = "강남구") | ||
@Schema(description = "시군구", example = "[\"강남구\"]") | ||
val districts: List<String>, | ||
) | ||
} |
50 changes: 50 additions & 0 deletions
50
server/src/test/kotlin/com/fone/jobOpening/infrastructure/JobOpeningRepositoryImplTest.kt
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,50 @@ | ||
package com.fone.jobOpening.infrastructure | ||
|
||
import com.fasterxml.jackson.databind.ObjectMapper | ||
import com.fone.common.CommonJobOpeningCallApi | ||
import com.fone.common.CommonUserCallApi | ||
import com.fone.common.CustomDescribeSpec | ||
import com.fone.common.IntegrationTest | ||
import com.fone.common.entity.Type | ||
import com.fone.jobOpening.domain.repository.JobOpeningRepository | ||
import com.fone.jobOpening.presentation.dto.RetrieveJobOpeningDto | ||
import io.kotest.matchers.shouldBe | ||
import io.kotest.matchers.shouldNotBe | ||
import org.springframework.test.web.reactive.server.WebTestClient | ||
|
||
@IntegrationTest | ||
class JobOpeningRepositoryImplTest( | ||
client: WebTestClient, | ||
private val objectMapper: ObjectMapper, | ||
private val jobOpeningRepository: JobOpeningRepository, | ||
) : | ||
CustomDescribeSpec() { | ||
|
||
init { | ||
describe("#findByFilters") { | ||
context("빈 구인구직 리스트를 조회하면") { | ||
it("성공한다") { | ||
val jobOpenings = jobOpeningRepository.findByFilters( | ||
org.springframework.data.domain.Pageable.unpaged(), | ||
RetrieveJobOpeningDto.RetrieveJobOpeningsRequest(type = Type.ACTOR) | ||
) | ||
|
||
jobOpenings.size shouldBe 0 | ||
} | ||
} | ||
} | ||
|
||
describe("#findById") { | ||
context("존재하는 구인구직을 상세 조회하면") { | ||
val (accessToken, _) = CommonUserCallApi.getAccessToken(client) | ||
val jobOpeningId = CommonJobOpeningCallApi.register(client, accessToken) | ||
|
||
it("성공한다") { | ||
val jobOpening = jobOpeningRepository.findById(1) | ||
jobOpening shouldNotBe null | ||
jobOpening?.id shouldBe 1 | ||
} | ||
} | ||
} | ||
} | ||
} |
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.