Skip to content

Commit

Permalink
test: (#286) 테스트 코드 반영
Browse files Browse the repository at this point in the history
  • Loading branch information
softpeanut committed Jan 9, 2023
1 parent ad38208 commit 59fcac1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import org.mockito.BDDMockito.given
import org.springframework.boot.test.mock.mockito.MockBean
import team.comit.simtong.domain.auth.exception.AuthExceptions
import team.comit.simtong.domain.auth.model.AuthCode
import team.comit.simtong.domain.auth.model.Code
import team.comit.simtong.domain.auth.spi.CommandAuthCodeLimitPort
import team.comit.simtong.domain.auth.spi.QueryAuthCodePort
import team.comit.simtong.global.annotation.SimtongTest
Expand All @@ -30,15 +31,15 @@ class CheckAuthCodeUseCaseTests {
private val authCodeStub: AuthCode by lazy {
AuthCode(
key = email,
code = code,
code = Code.of(code),
expirationTime = AuthCode.EXPIRED
)
}

private val differentAuthCodeStub by lazy {
AuthCode(
key = email,
code = "654321",
code = Code.of("654321"),
expirationTime = AuthCode.EXPIRED
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import org.springframework.boot.test.mock.mockito.MockBean
import team.comit.simtong.domain.auth.exception.AuthExceptions
import team.comit.simtong.domain.auth.model.AuthCode
import team.comit.simtong.domain.auth.model.AuthCodeLimit
import team.comit.simtong.domain.auth.model.Code
import team.comit.simtong.domain.auth.spi.CommandAuthCodeLimitPort
import team.comit.simtong.domain.auth.spi.CommandAuthCodePort
import team.comit.simtong.domain.auth.spi.QueryAuthCodeLimitPort
Expand Down Expand Up @@ -59,7 +60,7 @@ class SendAuthCodeUseCaseTests {
private val authCodeStub by lazy {
AuthCode(
key = email,
code = code,
code = Code.of(code),
expirationTime = AuthCode.EXPIRED
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class ChangeEmailUseCaseTests {
}

private val uncertifiedAuthCodeLimit: AuthCodeLimit by lazy {
AuthCodeLimit(
AuthCodeLimit.issue(
email = "test@test.com"
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class ResetPasswordUseCaseTests {
}

private val uncertifiedAuthCodeLimit: AuthCodeLimit by lazy {
AuthCodeLimit(
AuthCodeLimit.issue(
email = email
)
}
Expand Down

0 comments on commit 59fcac1

Please sign in to comment.