test: user-inboxの認証テストを追加

This commit is contained in:
usbharu 2023-12-03 13:09:21 +09:00
parent e1d99b7ea9
commit beeb27350e
2 changed files with 22 additions and 0 deletions

View File

@ -67,6 +67,16 @@ class InboxCommonTest {
) )
} }
@Karate.Test
@TestFactory
fun `user-inboxにHTTP Signatureがないリクエストがきたら401を返す`(): Karate {
return KarateUtil.e2eTest(
"InboxCommonTest",
"user-inboxにHTTP Signatureがないリクエストがきたら401を返す",
mapOf("karate.port" to port),
javaClass
)
}
companion object { companion object {
lateinit var server: MockServer lateinit var server: MockServer

View File

@ -91,3 +91,15 @@ Feature: Inbox Common Test
* print response * print response
Then match response.req == ['/users/test-user2'] Then match response.req == ['/users/test-user2']
Scenario: user-inboxにHTTP Signatureがないリクエストがきたら401を返す
* def inbox =
"""
{"type": "Follow"}
"""
Given path '/inbox'
And request inbox
When method post
Then status 401