diff --git a/dms-application/src/test/kotlin/team/aliens/dms/domain/student/usecase/ResetStudentPasswordUseCaseTests.kt b/dms-application/src/test/kotlin/team/aliens/dms/domain/student/usecase/ResetStudentPasswordUseCaseTests.kt index ef6c4aa29..fb02da3a9 100644 --- a/dms-application/src/test/kotlin/team/aliens/dms/domain/student/usecase/ResetStudentPasswordUseCaseTests.kt +++ b/dms-application/src/test/kotlin/team/aliens/dms/domain/student/usecase/ResetStudentPasswordUseCaseTests.kt @@ -179,6 +179,9 @@ class ResetStudentPasswordUseCaseTests { given(queryUserPort.queryUserByAccountId(requestStub.accountId)) .willReturn(userStub) + given(queryStudentPort.queryStudentById(studentStub.id)) + .willReturn(studentStub) + given(checkUserAuthority.execute(userStub.id)) .willReturn(Authority.MANAGER) diff --git a/dms-application/src/test/kotlin/team/aliens/dms/domain/student/usecase/SignUpUseCaseTests.kt b/dms-application/src/test/kotlin/team/aliens/dms/domain/student/usecase/SignUpUseCaseTests.kt index 9250e5289..3cbb58bff 100644 --- a/dms-application/src/test/kotlin/team/aliens/dms/domain/student/usecase/SignUpUseCaseTests.kt +++ b/dms-application/src/test/kotlin/team/aliens/dms/domain/student/usecase/SignUpUseCaseTests.kt @@ -224,6 +224,9 @@ class SignUpUseCaseTests { given(querySchoolPort.querySchoolByCode(code)) .willReturn(schoolStub) + given(queryAuthCodePort.queryAuthCodeByEmail(email)) + .willReturn(authCodeStub) + given(queryUserPort.existsUserByEmail(email)) .willReturn(true) diff --git a/dms-domain/src/main/kotlin/team/aliens/dms/domain/auth/model/AuthCode.kt b/dms-domain/src/main/kotlin/team/aliens/dms/domain/auth/model/AuthCode.kt index 6b9632fcf..85e749c48 100644 --- a/dms-domain/src/main/kotlin/team/aliens/dms/domain/auth/model/AuthCode.kt +++ b/dms-domain/src/main/kotlin/team/aliens/dms/domain/auth/model/AuthCode.kt @@ -28,7 +28,7 @@ data class AuthCode( } fun validateAuthCode(code: String) { - if (this.code == code) { + if (this.code != code) { throw AuthCodeMismatchException } }