[chore] internal/ap: add pollable AS types, code reformatting, general niceties (#2248)

This commit is contained in:
kim 2023-10-03 14:59:30 +01:00 committed by GitHub
commit 297b6eeaaa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 559 additions and 224 deletions

View file

@ -486,7 +486,7 @@ func (suite *InboxPostTestSuite) TestPostEmptyCreate() {
requestingAccount,
targetAccount,
http.StatusBadRequest,
`{"error":"Bad Request: incoming Activity Create did not have required id property set"}`,
`{"error":"Bad Request: missing ActivityStreams id property"}`,
suite.signatureCheck,
)
}
@ -511,7 +511,7 @@ func (suite *InboxPostTestSuite) TestPostFromBlockedAccount() {
requestingAccount,
targetAccount,
http.StatusForbidden,
`{"error":"Forbidden"}`,
`{"error":"Forbidden: blocked"}`,
suite.signatureCheck,
)
}
@ -555,7 +555,7 @@ func (suite *InboxPostTestSuite) TestPostUnauthorized() {
requestingAccount,
targetAccount,
http.StatusUnauthorized,
`{"error":"Unauthorized"}`,
`{"error":"Unauthorized: not authenticated"}`,
// Omit signature check middleware.
)
}