[bugfix] unwrap boosts when checking in-reply-to status (#2702)

* add stronger checks on status being replied to

* update error code test is expecting
This commit is contained in:
kim 2024-02-29 14:20:57 +00:00 committed by GitHub
commit fcecd0c952
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 46 additions and 41 deletions

View file

@ -284,13 +284,13 @@ func (suite *StatusCreateTestSuite) TestReplyToNonexistentStatus() {
// check response
suite.EqualValues(http.StatusBadRequest, recorder.Code)
suite.EqualValues(http.StatusNotFound, recorder.Code)
result := recorder.Result()
defer result.Body.Close()
b, err := ioutil.ReadAll(result.Body)
suite.NoError(err)
suite.Equal(`{"error":"Bad Request: cannot reply to status that does not exist"}`, string(b))
suite.Equal(`{"error":"Not Found: target status not found"}`, string(b))
}
// Post a reply to the status of a local user that allows replies.