generated from pricelees/issue-pr-template
[#44] 매장 기능 도입 #45
@ -45,8 +45,8 @@ class AuthApiTest(
|
||||
account = admin.account,
|
||||
password = admin.password,
|
||||
type = PrincipalType.ADMIN,
|
||||
) {
|
||||
val token: String = it.extract().path("data.accessToken")
|
||||
) { response ->
|
||||
val token: String = response.extract().path("data.accessToken")
|
||||
jwtUtils.extractSubject(token) shouldBe admin.id.toString()
|
||||
jwtUtils.extractClaim(token, CLAIM_STORE_ID_KEY) shouldBe admin.storeId?.toString()
|
||||
jwtUtils.extractClaim(token, CLAIM_ADMIN_TYPE_KEY) shouldBe admin.type.name
|
||||
@ -89,8 +89,8 @@ class AuthApiTest(
|
||||
}
|
||||
).also {
|
||||
assertSoftly(loginHistoryRepository.findByPrincipalId(admin.id)[0]) {
|
||||
it.success shouldBe false
|
||||
it.principalType shouldBe PrincipalType.ADMIN
|
||||
this.success shouldBe false
|
||||
this.principalType shouldBe PrincipalType.ADMIN
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -116,8 +116,8 @@ class AuthApiTest(
|
||||
}
|
||||
).also {
|
||||
assertSoftly(loginHistoryRepository.findByPrincipalId(admin.id)[0]) {
|
||||
it.success shouldBe false
|
||||
it.principalType shouldBe PrincipalType.ADMIN
|
||||
this.success shouldBe false
|
||||
this.principalType shouldBe PrincipalType.ADMIN
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user