mirror of https://github.com/usbharu/Hideout.git
test: user-inboxの認証テストを追加
This commit is contained in:
parent
e1d99b7ea9
commit
beeb27350e
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue