Skip to content

Commit

Permalink
fix: GET /dept 응답 메시지 자료형 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
songsunkook committed Dec 30, 2023
1 parent 9673357 commit 4122236
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
import in.koreatech.koin.domain.dept.model.DeptNum;

@JsonNaming(value = PropertyNamingStrategies.SnakeCaseStrategy.class)
public record DeptResponse(Long deptNum, String name) {
public record DeptResponse(String deptNum, String name) {

public static DeptResponse from(DeptNum deptNum) {
return new DeptResponse(deptNum.getNumber(), deptNum.getDeptInfo().getName());
return new DeptResponse(deptNum.getNumber().toString(), deptNum.getDeptInfo().getName());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ void findDeptNameByDeptNumber() {

assertSoftly(
softly -> {
softly.assertThat(response.body().jsonPath().getLong("dept_num")).isEqualTo(deptNum1.getNumber());
softly.assertThat(response.body().jsonPath().getString("dept_num")).isEqualTo(deptNum1.getNumber().toString());
softly.assertThat(response.body().jsonPath().getString("name")).isEqualTo(deptInfo.getName());
}
);
Expand Down

0 comments on commit 4122236

Please sign in to comment.