mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 04:12:25 -05:00
[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:
parent
c2a691fd83
commit
fcecd0c952
2 changed files with 46 additions and 41 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue