mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[bugfix] Return 501 (not implemented) if user tries to schedule post (#3395)
This commit is contained in:
@ -365,6 +365,25 @@ func (suite *StatusCreateTestSuite) TestPostNewStatusMessedUpIntPolicy() {
|
||||
}`, out)
|
||||
}
|
||||
|
||||
func (suite *StatusCreateTestSuite) TestPostNewScheduledStatus() {
|
||||
out, recorder := suite.postStatus(map[string][]string{
|
||||
"status": {"this is a brand new status! #helloworld"},
|
||||
"spoiler_text": {"hello hello"},
|
||||
"sensitive": {"true"},
|
||||
"visibility": {string(apimodel.VisibilityMutualsOnly)},
|
||||
"scheduled_at": {"2080-10-04T15:32:02.018Z"},
|
||||
}, "")
|
||||
|
||||
// We should have 501 from
|
||||
// our call to the function.
|
||||
suite.Equal(http.StatusNotImplemented, recorder.Code)
|
||||
|
||||
// We should have a helpful error message.
|
||||
suite.Equal(`{
|
||||
"error": "Not Implemented: scheduled_at is not yet implemented"
|
||||
}`, out)
|
||||
}
|
||||
|
||||
func (suite *StatusCreateTestSuite) TestPostNewStatusMarkdown() {
|
||||
out, recorder := suite.postStatus(map[string][]string{
|
||||
"status": {statusMarkdown},
|
||||
|
Reference in New Issue
Block a user