Skip to content

Commit

Permalink
test: (#78) 누락된 부분 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
khcho0125 committed Sep 27, 2022
1 parent 6aaf8a6 commit 9eaf4b0
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package team.comit.simtong.domain.auth.usecase

import org.junit.jupiter.api.BeforeEach
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.assertDoesNotThrow
import org.junit.jupiter.api.assertThrows
import org.junit.jupiter.api.extension.ExtendWith
import org.mockito.BDDMockito.given
Expand Down Expand Up @@ -86,8 +87,10 @@ class SendAuthCodeUseCaseTests {

willDoNothing().given(sendEmailPort).sendAuthCode(code, email)

// when
sendAuthCodeUseCase.execute(email)
// when & then
assertDoesNotThrow {
sendAuthCodeUseCase.execute(email)
}
}

@Test
Expand All @@ -108,6 +111,7 @@ class SendAuthCodeUseCaseTests {
given(queryAuthCodeLimitPort.queryAuthCodeLimitByEmail(email))
.willReturn(exceedAuthCodeLimitStub)

// when & then
assertThrows<ExceededSendAuthCodeRequestException> {
sendAuthCodeUseCase.execute(email)
}
Expand Down

0 comments on commit 9eaf4b0

Please sign in to comment.