diff --git a/simtong-application/src/test/kotlin/team/comit/simtong/domain/schedule/usecase/ChangeIndividualScheduleUseCaseTest.kt b/simtong-application/src/test/kotlin/team/comit/simtong/domain/schedule/usecase/ChangeIndividualScheduleUseCaseTest.kt index 34445c09..6ae48c29 100644 --- a/simtong-application/src/test/kotlin/team/comit/simtong/domain/schedule/usecase/ChangeIndividualScheduleUseCaseTest.kt +++ b/simtong-application/src/test/kotlin/team/comit/simtong/domain/schedule/usecase/ChangeIndividualScheduleUseCaseTest.kt @@ -65,7 +65,7 @@ class ChangeIndividualScheduleUseCaseTest { password = "test password", employeeNumber = 1234567890, authority = Authority.ROLE_COMMON, - spotId = UUID.randomUUID(), + spotId = spotId, teamId = UUID.randomUUID(), profileImagePath = "test profile image" ) @@ -112,35 +112,6 @@ class ChangeIndividualScheduleUseCaseTest { } } - @Test - fun `소유자가 아님`() { - // given - val otherScheduleStub = Schedule( - id = scheduleId, - userId = UUID.randomUUID(), - spotId = spotId, - title = "test title", - scope = Scope.INDIVIDUAL, - startAt = LocalDate.now(), - endAt = LocalDate.now(), - alarmTime = Schedule.DEFAULT_ALARM_TIME - ) - - given(securityPort.getCurrentUserId()) - .willReturn(userId) - - given(querySchedulePort.queryScheduleById(requestStub.scheduleId)) - .willReturn(otherScheduleStub) - - given(queryUserPort.queryUserById(userId)) - .willReturn(userStub) - - // when & then - assertThrows { - changeIndividualScheduleUseCase.execute(requestStub) - } - } - @Test fun `유저를 찾을 수 없음`() { // given diff --git a/simtong-application/src/test/kotlin/team/comit/simtong/domain/schedule/usecase/ChangeSpotScheduleUseCaseTests.kt b/simtong-application/src/test/kotlin/team/comit/simtong/domain/schedule/usecase/ChangeSpotScheduleUseCaseTests.kt index 004d8846..6fcf844b 100644 --- a/simtong-application/src/test/kotlin/team/comit/simtong/domain/schedule/usecase/ChangeSpotScheduleUseCaseTests.kt +++ b/simtong-application/src/test/kotlin/team/comit/simtong/domain/schedule/usecase/ChangeSpotScheduleUseCaseTests.kt @@ -144,7 +144,7 @@ class ChangeSpotScheduleUseCaseTests { .willReturn(individualScheduleStub) // when & then - assertThrows { + assertThrows { changeSpotScheduleUseCase.execute(requestStub) } }