Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion src/main/resources/application-dep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
spring:
jpa:
hibernate:
ddl-auto: none
ddl-auto: validate

config:
activate:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,25 @@ class ClassRoomControllerTest {
void testGetAllClassRooms() {
// given
String token = "fake-token";
UUID userId = 1L;
UUID userId = UUID.randomUUID();

UUID classRoomId1 = UUID.randomUUID();
UUID classRoomId2 = UUID.randomUUID();

HttpServletRequest mockRequest = mock(HttpServletRequest.class);
when(jwtUtil.getToken(mockRequest)).thenReturn(token);
when(jwtUtil.getUserId(token)).thenReturn(userId);

List<ClassRoomCardDto> mockList = List.of(
ClassRoomCardDto.builder()
.classRoomId(1L)
.classRoomId(classRoomId1)
.name("자바를 자바라")
.sort("JAVA")
.target("2-2")
.studentCount(2)
.build(),
ClassRoomCardDto.builder()
.classRoomId(2L)
.classRoomId(classRoomId2)
.name("자바를 자바라")
.sort("JAVA")
.target("2-1")
Expand Down