Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 역량 키워드 미 선택 예외 처리(#137) #138

Merged
merged 2 commits into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@ class ExperienceCreateService(
ExperienceContent.create(it.question, it.answer)
}

val newExperienceStrongPoints = request.strongPointIds.map {
ExperienceStrongPoint.create(it)
}
val newExperienceStrongPoints = runCatching {
request.strongPointIds.map {
ExperienceStrongPoint.create(it)
}
}.getOrElse { emptyList() }

return experienceAppender.appendExperience(
title = request.title,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -522,10 +522,32 @@ class ExperienceControllerTest : BaseRestDocsTest() {
@DisplayName("유저의 경험 내 존재하는 연도들을 중복 제거한 리스트를 반환한다.")
fun getExperienceYearsTest() {
//given
val years = arrayListOf(2020,2021,2023, 2024, 2025)
val tagDetails = arrayListOf(
ExperienceYear.TagDetail(
UUID.randomUUID(),
"태그 상세 1"
),
ExperienceYear.TagDetail(
UUID.randomUUID(),
"태그 상세 1"
)
)

val yearTagInfos = arrayListOf(
ExperienceYear.YearTagInfo(
2023,
tagDetails
),
ExperienceYear.YearTagInfo(
2024,
tagDetails
)
)

val years = arrayListOf(2023, 2024)
val yearResponse = ExperienceYear.Response(
years,
generateFixture()
yearTagInfos
)

given(experienceGetService.getAllYearsByExistExperience()).willReturn(yearResponse)
Expand Down
Loading