test: 必要になった権限を追加

This commit is contained in:
usbharu 2024-05-16 15:53:17 +09:00
parent 931a7a638a
commit b686ac295f
1 changed files with 4 additions and 0 deletions

View File

@ -113,6 +113,7 @@ class AccountApiTest {
param("email", "test@example.com") param("email", "test@example.com")
param("agreement", "true") param("agreement", "true")
param("locale", "") param("locale", "")
with(jwt())
with(csrf()) with(csrf())
} }
.asyncDispatch() .asyncDispatch()
@ -129,6 +130,7 @@ class AccountApiTest {
contentType = MediaType.APPLICATION_FORM_URLENCODED contentType = MediaType.APPLICATION_FORM_URLENCODED
param("username", "api-test-user-2") param("username", "api-test-user-2")
param("password", "very-secure-password") param("password", "very-secure-password")
with(jwt())
with(csrf()) with(csrf())
} }
.asyncDispatch() .asyncDispatch()
@ -145,6 +147,7 @@ class AccountApiTest {
contentType = MediaType.APPLICATION_FORM_URLENCODED contentType = MediaType.APPLICATION_FORM_URLENCODED
param("password", "api-test-user-3") param("password", "api-test-user-3")
with(csrf()) with(csrf())
with(jwt())
} }
.andDo { print() } .andDo { print() }
.andExpect { status { isUnprocessableEntity() } } .andExpect { status { isUnprocessableEntity() } }
@ -158,6 +161,7 @@ class AccountApiTest {
contentType = MediaType.APPLICATION_FORM_URLENCODED contentType = MediaType.APPLICATION_FORM_URLENCODED
param("username", "api-test-user-4") param("username", "api-test-user-4")
with(csrf()) with(csrf())
with(jwt())
} }
.andExpect { status { isUnprocessableEntity() } } .andExpect { status { isUnprocessableEntity() } }
} }