test: 匿名認証時のテストを追加

This commit is contained in:
usbharu 2024-02-01 15:54:10 +09:00
parent a062d0b9c3
commit 9b0d37722c
1 changed files with 17 additions and 0 deletions

View File

@ -424,6 +424,23 @@ class AccountApiTest {
.andExpect { status { isUnauthorized() } }
}
@Test
fun `apiV1AccountsIdStatusesGet read権限で取得できる`() {
mockMvc
.get("/api/v1/accounts/1/statuses")
.asyncDispatch()
.andExpect { status { isOk() } }
}
@Test
@WithAnonymousUser
fun `apiV1AccountsIdStatusesGet 匿名でもpublic投稿を取得できる`() {
mockMvc
.get("/api/v1/accounts/1/statuses")
.asyncDispatch()
.andExpect { status { isOk() } }
}
companion object {
@JvmStatic
@AfterAll